Skip to content

Commit bf227bd

Browse files
committed
style: format io::Error::new in cp and printf stdout_state for better readability
- Split arguments onto multiple lines in both cp.rs and printf.rs to improve code formatting and consistency. No functional changes.
1 parent ec99d94 commit bf227bd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/uu/cp/src/cp.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ mod stdout_state {
123123
}
124124
#[cfg(not(unix))]
125125
{
126-
return Err(io::Error::new(io::ErrorKind::BrokenPipe, "stdout was closed"));
126+
return Err(io::Error::new(
127+
io::ErrorKind::BrokenPipe,
128+
"stdout was closed",
129+
));
127130
}
128131
}
129132
Ok(())

src/uu/printf/src/printf.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ mod stdout_state {
9999
}
100100
#[cfg(not(unix))]
101101
{
102-
return Err(io::Error::new(io::ErrorKind::BrokenPipe, "stdout was closed"));
102+
return Err(io::Error::new(
103+
io::ErrorKind::BrokenPipe,
104+
"stdout was closed",
105+
));
103106
}
104107
}
105108
Ok(())

0 commit comments

Comments
 (0)