diff options
Diffstat (limited to 'src/sandbox/mod.rs')
| -rw-r--r-- | src/sandbox/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sandbox/mod.rs b/src/sandbox/mod.rs index bb6ab60..1c73e40 100644 --- a/src/sandbox/mod.rs +++ b/src/sandbox/mod.rs @@ -35,7 +35,7 @@ impl Cmd { self } pub fn name(&self) -> &str { - self.argv.first().map(String::as_str).unwrap_or("") + self.argv.first().map_or("", String::as_str) } } @@ -134,7 +134,7 @@ fn bound_listener(addr: &str, token: &str) -> Result<Bound> { let key = (addr.to_string(), token.to_string()); // A poisoned registry means a panic in another thread's bind; the map is // still sound, so recover rather than wedge every later build. - let mut reg = registry.lock().unwrap_or_else(|p| p.into_inner()); + let mut reg = registry.lock().unwrap_or_else(std::sync::PoisonError::into_inner); if let Some(b) = reg.get(&key) { return Ok(b.clone()); } |
