Skip to content

Commit bc67f6b

Browse files
committed
Debug formatting of raw_arg()
1 parent 8f9d0f1 commit bc67f6b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

library/std/src/sys/windows/process.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,13 @@ impl Command {
327327

328328
impl fmt::Debug for Command {
329329
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
330-
write!(f, "{:?}", self.program)?;
330+
self.program.fmt(f)?;
331331
for arg in &self.args {
332-
write!(f, " {:?}", arg)?;
332+
f.write_str(" ")?;
333+
match arg {
334+
Arg::Regular(s) => s.fmt(f),
335+
Arg::Raw(s) => f.write_str(&s.to_string_lossy()),
336+
}?;
333337
}
334338
Ok(())
335339
}

0 commit comments

Comments
 (0)