style: format the whole tree with cargo fmt (stock defaults, #35)
One-time, mechanical reformat — no functional changes. The tree was not rustfmt-clean (~1800 hunks across ~100 files); this brings it to stock `cargo fmt` defaults so a `cargo fmt --check` CI gate can follow. Behaviour-preserving: 2509 pass / 0 fail / 1 ignored (unchanged baseline), clippy clean. A .git-blame-ignore-revs entry follows so `git blame` skips this commit.
This commit is contained in:
+8
-2
@@ -170,7 +170,10 @@ fn local_hostname() -> String {
|
||||
/// Uses `sysinfo` to query the OS process table.
|
||||
fn pid_is_alive(pid: u32) -> bool {
|
||||
let mut sys = System::new();
|
||||
sys.refresh_processes(sysinfo::ProcessesToUpdate::Some(&[Pid::from_u32(pid)]), true);
|
||||
sys.refresh_processes(
|
||||
sysinfo::ProcessesToUpdate::Some(&[Pid::from_u32(pid)]),
|
||||
true,
|
||||
);
|
||||
sys.process(Pid::from_u32(pid)).is_some()
|
||||
}
|
||||
|
||||
@@ -211,7 +214,10 @@ mod tests {
|
||||
// The first lock writes our own PID; a second attempt
|
||||
// should refuse because the PID is alive on this host.
|
||||
let err = Lock::acquire(dir.path()).expect_err("should refuse second acquisition");
|
||||
assert!(matches!(err, LockError::AlreadyHeld { .. }), "unexpected: {err:?}");
|
||||
assert!(
|
||||
matches!(err, LockError::AlreadyHeld { .. }),
|
||||
"unexpected: {err:?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user