Skip to content

Commit 538c45d

Browse files
committed
Resolve clippy::unnecessary_debug_formatting warning
``` error: unnecessary `Debug` formatting in `format!` args --> src/main.rs:673:53 | 673 | path.to_str().with_context(|| format!("{path:?} contains invalid utf-8 data"))?, | ^^^^ | = help: use `Display` formatting and change this to `path.display()` = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_debug_formatting = note: `-D clippy::unnecessary-debug-formatting` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_debug_formatting)]` ```
1 parent 13fb477 commit 538c45d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,9 @@ fn merge_profraw(cx: &Context) -> Result<()> {
669669
}
670670
let mut input_files = String::new();
671671
for path in profraw_files {
672-
input_files.push_str(
673-
path.to_str().with_context(|| format!("{path:?} contains invalid utf-8 data"))?,
674-
);
672+
input_files.push_str(path.to_str().with_context(|| {
673+
format!("{} ({:?}) contains invalid utf-8 data", path.display(), path.as_os_str())
674+
})?);
675675
input_files.push('\n');
676676
}
677677
let input_files_path = &cx.ws.target_dir.join(format!("{}-profraw-list", cx.ws.name));

0 commit comments

Comments
 (0)