Skip to content

Tracking issue for Vec::retain_mut and VecDeque::retain_mut #90829

Closed
@GuillaumeGomez

Description

Feature gate: #![feature(vec_retain_mut)]

This is a tracking issue for adding the retain_mut method on Vec.

It'll provide a retain_mut method on the Vec and on the VecDeque types. It is the equivalent of the Vec::retain and VecDeque methods except that it'll expect a closure with a mutable argument instead of a const one. It'll allow to modify the elements of an array while filtering which elements we want to keep.

Public API

pub fn retain_mut<F>(&mut self, mut f: F)
    where
        F: FnMut(&mut T) -> bool;

Steps / History

Unresolved Questions

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

A-collectionsArea: `std::collection`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions