Runtime: a commit drains the buffers made since the last in place

Clippy's drain_collect named the collect of the made entries into a vector of their own; the loop
now drains them directly, its other borrows being of the change list's other fields.

Verified: clippy of the conformance crate's dependencies in job m3-max-81865 (CPU-only build)
failed on it; the clippy job follows.
This commit is contained in:
Anees Iqbal committed 2026-12-02 21:46:14 -08:00
1 parent 367f1f2313
commit 6469bd9bc0
1 file changed
+1 -2
+1 -2
View File
@@ -206,8 +206,7 @@ impl Changes {
taken.dedup();
}
let mut modified = Vec::with_capacity(taken.len() + self.made.len());
let made: Vec<Named> = self.made.drain(..).collect();
for made in made {
for made in self.made.drain(..) {
let index = self.at.get(&(Weak::as_ptr(&made.buffer) as usize)).copied();
match index.filter(|index| taken.binary_search(index).is_ok()) {
Some(index) => {