about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-11-17 15:58:01 +0100
committerGitHub <noreply@github.com>2021-11-17 15:58:01 +0100
commit904dba506640f290c182f5f6e717a82c6e5b8dae (patch)
tree1a7dd7bd7b853cb4d629a64237b49d5f202d5f73 /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentec84633b542a7c14e380c8fb77f20a84b12cb2fe (diff)
parentc15b55ace6ae247fa1ca0001d8840c974644a817 (diff)
downloadrust-904dba506640f290c182f5f6e717a82c6e5b8dae.tar.gz
rust-904dba506640f290c182f5f6e717a82c6e5b8dae.zip
Rollup merge of #90772 - GuillaumeGomez:vec-retain-mut, r=joshtriplett
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``````
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions