mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
904dba5066
Add Vec::retain_mut This is to continue the discussion started in #83218. Original comment was: > Take 2 of #34265, since I needed this today. The reason I think why we should add `retain_mut` is for coherency and for discoverability. For example we have `chunks` and `chunks_mut` or `get` and `get_mut` or `iter` and `iter_mut`, etc. When looking for mutable `retain`, I would expect `retain_mut` to exist. It took me a while to find out about `drain_filter`. So even if it provides an API close to `drain_filter`, just for the discoverability, I think it's worth it. cc ``````@m-ou-se`````` ``````@jonas-schievink`````` ``````@Mark-Simulacrum`````` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@b02ed04a7e | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@5fdbc476af | ||
test | ||
unwind |