Skip to content

Commit 776e204

Browse files
committed
rustdoc: Use Vec::into_iter() rather than drain()
This allows removing a `mut` which is nicer. Suggested-by: @jyn514 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
1 parent 1d6c860 commit 776e204

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl Options {
377377
}
378378
};
379379

380-
let mut default_settings: Vec<Vec<(String, String)>> = vec![
380+
let default_settings: Vec<Vec<(String, String)>> = vec![
381381
matches
382382
.opt_str("default-theme")
383383
.iter()
@@ -401,7 +401,7 @@ impl Options {
401401
})
402402
.collect(),
403403
];
404-
let default_settings = default_settings.drain(..).flatten().collect();
404+
let default_settings = default_settings.into_iter().flatten().collect();
405405

406406
let test_args = matches.opt_strs("test-args");
407407
let test_args: Vec<String> =

0 commit comments

Comments
 (0)