Skip to content

Commit ddd221f

Browse files
committed
refactor: simplify conditional argument addition
1 parent 4c5bad0 commit ddd221f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

tests/one_file_system.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,7 @@ fn cross_device_excludes_mount() {
267267
.with_stdin(Stdio::null())
268268
.with_stdout(Stdio::piped())
269269
.with_stderr(Stdio::piped())
270-
.pipe(|command| {
271-
if one_file_system {
272-
command.with_arg("--one-file-system")
273-
} else {
274-
command
275-
}
276-
})
270+
.with_args(one_file_system.then_some("--one-file-system"))
277271
.with_arg(&workspace)
278272
.output()
279273
.expect("run pdu")

0 commit comments

Comments
 (0)