Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 7d704a9

Browse files
authored
Fix clippy (#2152)
1 parent 4878356 commit 7d704a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/agent/input-tester/src/logging.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
use std::fmt::Write;
45
use std::{ffi::OsStr, path::Path, process::Output};
56

7+
use log::warn;
8+
69
pub fn command_invocation<S, T, I>(command: S, args: I) -> String
710
where
811
S: AsRef<OsStr>,
@@ -18,7 +21,9 @@ where
1821
result.push('"');
1922
}
2023
let arg: &Path = arg.as_ref().as_ref();
21-
result.push_str(&format!("{}", arg.display()));
24+
if let Err(e) = write!(result, "{}", arg.display()) {
25+
warn!("Failed to write arg: {} with error: {}", arg.display(), e);
26+
}
2227
if needs_quotes {
2328
result.push('"');
2429
}

0 commit comments

Comments
 (0)