Skip to content

Commit 924dce0

Browse files
committed
Remove needless trim
1 parent 0ddfca6 commit 924dce0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ fn merge_profraw(cx: &Context) -> Result<()> {
675675
cmd.arg(format!("-failure-mode={mode}"));
676676
}
677677
if let Some(flags) = &cx.llvm_profdata_flags {
678-
cmd.args(flags.split(' ').filter(|s| !s.trim().is_empty()));
678+
cmd.args(flags.split(' ').filter(|s| !s.trim_start().is_empty()));
679679
}
680680
if term::verbose() {
681681
status!("Running", "{cmd}");
@@ -1044,7 +1044,7 @@ impl Format {
10441044
}
10451045

10461046
if let Some(flags) = &cx.llvm_cov_flags {
1047-
cmd.args(flags.split(' ').filter(|s| !s.trim().is_empty()));
1047+
cmd.args(flags.split(' ').filter(|s| !s.trim_start().is_empty()));
10481048
}
10491049

10501050
if cx.args.cov.cobertura {

src/process.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,14 @@ fn process_error(mut msg: String, status: Option<ExitStatus>, output: Option<&Ou
228228

229229
if let Some(out) = output {
230230
match str::from_utf8(&out.stdout) {
231-
Ok(s) if !s.trim().is_empty() => {
231+
Ok(s) if !s.trim_start().is_empty() => {
232232
msg.push_str("\n--- stdout\n");
233233
msg.push_str(s);
234234
}
235235
Ok(_) | Err(_) => {}
236236
}
237237
match str::from_utf8(&out.stderr) {
238-
Ok(s) if !s.trim().is_empty() => {
238+
Ok(s) if !s.trim_start().is_empty() => {
239239
msg.push_str("\n--- stderr\n");
240240
msg.push_str(s);
241241
}

0 commit comments

Comments
 (0)