Skip to content

Commit 6629194

Browse files
committed
Trim trailing newlines in the output
1 parent 0b24b15 commit 6629194

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ impl Library {
365365
}
366366

367367
fn parse_libs_cflags(&mut self, name: &str, output: &str, config: &Config) {
368-
let parts = output.split(' ')
368+
let parts = output.trim_right()
369+
.split(' ')
369370
.filter(|l| l.len() > 2)
370371
.map(|arg| (&arg[0..2], &arg[2..]))
371372
.collect::<Vec<_>>();
@@ -402,7 +403,7 @@ impl Library {
402403
}
403404
}
404405

405-
let mut iter = output.split(' ');
406+
let mut iter = output.trim_right().split(' ');
406407
while let Some(part) = iter.next() {
407408
if part != "-framework" {
408409
continue

0 commit comments

Comments
 (0)