Skip to content

Commit

Permalink
Remove needless trim
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 14, 2024
1 parent 0ddfca6 commit 924dce0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ fn merge_profraw(cx: &Context) -> Result<()> {
cmd.arg(format!("-failure-mode={mode}"));
}
if let Some(flags) = &cx.llvm_profdata_flags {
cmd.args(flags.split(' ').filter(|s| !s.trim().is_empty()));
cmd.args(flags.split(' ').filter(|s| !s.trim_start().is_empty()));
}
if term::verbose() {
status!("Running", "{cmd}");
Expand Down Expand Up @@ -1044,7 +1044,7 @@ impl Format {
}

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

if cx.args.cov.cobertura {
Expand Down
4 changes: 2 additions & 2 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,14 @@ fn process_error(mut msg: String, status: Option<ExitStatus>, output: Option<&Ou

if let Some(out) = output {
match str::from_utf8(&out.stdout) {
Ok(s) if !s.trim().is_empty() => {
Ok(s) if !s.trim_start().is_empty() => {
msg.push_str("\n--- stdout\n");
msg.push_str(s);
}
Ok(_) | Err(_) => {}
}
match str::from_utf8(&out.stderr) {
Ok(s) if !s.trim().is_empty() => {
Ok(s) if !s.trim_start().is_empty() => {
msg.push_str("\n--- stderr\n");
msg.push_str(s);
}
Expand Down

0 comments on commit 924dce0

Please sign in to comment.