Enable clippy::drain_collect (#8745)

This PR enables the
[`clippy::drain_collect`](https://rust-lang.github.io/rust-clippy/master/index.html#/drain_collect)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-03-02 21:14:42 -05:00
committed by GitHub
parent 4097e8870b
commit bd00aed7db
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -2883,7 +2883,7 @@ impl LineWithInvisibles {
.unwrap();
layouts.push(Self {
line: shaped_line,
invisibles: invisibles.drain(..).collect(),
invisibles: std::mem::take(&mut invisibles),
});
line.clear();