cargo fmt

This commit is contained in:
2026-04-29 23:20:25 +09:00
parent 3fc65e6f6b
commit f31c58dccd
18 changed files with 96 additions and 104 deletions
+5 -4
View File
@@ -150,13 +150,14 @@ pub fn lookup_session(session_id: SessionId) -> Result<Option<SessionLockInfo>,
let lock_path = default_registry_path()?;
let mut guard = LockFileGuard::open(&lock_path)?;
crate::mutate::reclaim_stale(&mut guard);
Ok(guard.data().find_by_session(session_id).map(|a| {
SessionLockInfo {
Ok(guard
.data()
.find_by_session(session_id)
.map(|a| SessionLockInfo {
pod_name: a.pod_name.clone(),
socket: a.socket.clone(),
pid: a.pid,
}
}))
}))
}
#[cfg(test)]
+1 -4
View File
@@ -249,10 +249,7 @@ mod tests {
assert!(g.data().find_by_session(target_session).is_none());
// After adopt-style rewrite, the same allocation is now found.
g.data_mut()
.find_mut("child")
.unwrap()
.session_id = Some(target_session);
g.data_mut().find_mut("child").unwrap().session_id = Some(target_session);
let found = g.data().find_by_session(target_session).unwrap();
assert_eq!(found.pod_name, "child");
}