mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-14 00:01:12 +01:00
Fomat and clippy
This commit is contained in:
parent
319727b0a6
commit
d8540d76b8
2 changed files with 12 additions and 6 deletions
|
@ -13,5 +13,12 @@ fn help() {
|
|||
|
||||
assert!(output.status.success(), "--help returns 0");
|
||||
assert_eq!(output.stderr, Vec::<u8>::new(), "--help stderr is empty");
|
||||
assert_snapshot!(if cfg!(windows) { "help_windows" } else { "help_unix" }, String::from_utf8(output.stdout).unwrap());
|
||||
assert_snapshot!(
|
||||
if cfg!(windows) {
|
||||
"help_windows"
|
||||
} else {
|
||||
"help_unix"
|
||||
},
|
||||
String::from_utf8(output.stdout).unwrap()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -370,19 +370,18 @@ mod imp {
|
|||
command.env(name, val);
|
||||
}
|
||||
|
||||
command.spawn().and_then(|p| {
|
||||
command.spawn().map(|p| {
|
||||
let handle = p.into_raw_handle();
|
||||
let r = unsafe { AssignProcessToJobObject(job, handle) };
|
||||
if r == 0 {
|
||||
if unsafe { AssignProcessToJobObject(job, handle) } == 0 {
|
||||
panic!("failed to add to job object: {}", last_err());
|
||||
}
|
||||
|
||||
resume_threads(handle);
|
||||
|
||||
Ok(Self {
|
||||
Self {
|
||||
job,
|
||||
completion_port,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue