mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-28 21:18:11 -05:00
upgrade various Rust dependencies
This stops using parking_lot entirely. Since Rust 1.62, the std implementations on Linux are direct futexes, not the boxed pthread mutexes they used to be. No real reason to use parking_lot anymore, so shed this dependency.
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
use failure::Error;
|
||||
use log::warn;
|
||||
use parking_lot::Mutex;
|
||||
use std::mem;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{mpsc, Arc};
|
||||
use std::thread;
|
||||
use std::time::Duration as StdDuration;
|
||||
@@ -160,15 +160,15 @@ impl SimulatedClocks {
|
||||
|
||||
impl Clocks for SimulatedClocks {
|
||||
fn realtime(&self) -> Timespec {
|
||||
self.0.boot + *self.0.uptime.lock()
|
||||
self.0.boot + *self.0.uptime.lock().unwrap()
|
||||
}
|
||||
fn monotonic(&self) -> Timespec {
|
||||
Timespec::new(0, 0) + *self.0.uptime.lock()
|
||||
Timespec::new(0, 0) + *self.0.uptime.lock().unwrap()
|
||||
}
|
||||
|
||||
/// Advances the clock by the specified amount without actually sleeping.
|
||||
fn sleep(&self, how_long: Duration) {
|
||||
let mut l = self.0.uptime.lock();
|
||||
let mut l = self.0.uptime.lock().unwrap();
|
||||
*l = *l + how_long;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user