Skip to content

Commit 51e784d

Browse files
KSXGitHubclaude
andauthored
refactor: replace complex pipe-closure with simple then_some (#373)
https://claude.ai/code/session_01RNq8cLPfc5PEN4M8cQodwx Co-authored-by: Claude <noreply@anthropic.com>
1 parent ba71d11 commit 51e784d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/cli_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn stdio(command: Command) -> Command {
3535
#[cfg(unix)]
3636
fn fs_permission(path: impl AsRef<Path>, permission: &'static str, recursive: bool) {
3737
let Output { status, stderr, .. } = Command::new("chmod")
38-
.pipe(|cmd| if recursive { cmd.with_arg("-R") } else { cmd })
38+
.with_args(recursive.then_some("-R"))
3939
.with_arg(permission)
4040
.with_arg(path.as_ref())
4141
.with_stdin(Stdio::null())

0 commit comments

Comments
 (0)