Skip to content

Commit 948f45f

Browse files
committed
Remove unneeded Iterator::collect() and directly work on the iterator instead
1 parent 76df4d8 commit 948f45f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,8 @@ impl Library {
527527
let parts = words
528528
.iter()
529529
.filter(|l| l.len() > 2)
530-
.map(|arg| (&arg[0..2], &arg[2..]))
531-
.collect::<Vec<_>>();
532-
for &(flag, val) in &parts {
530+
.map(|arg| (&arg[0..2], &arg[2..]));
531+
for (flag, val) in parts {
533532
match flag {
534533
"-L" => {
535534
let meta = format!("rustc-link-search=native={}", val);

0 commit comments

Comments
 (0)