Use 'parking_lot' 'Mutex' in fairing's 'Once'.

This commit is contained in:
Sergio Benitez 2023-04-04 15:11:09 -07:00
parent d9f86d8647
commit 5e7a75e1a5
1 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,5 @@
use std::sync::Mutex;
use futures::future::{Future, BoxFuture, FutureExt};
use parking_lot::Mutex;
use crate::{Rocket, Request, Response, Data, Build, Orbit};
use crate::fairing::{Fairing, Kind, Info, Result};
@ -47,7 +46,7 @@ impl<F: ?Sized> Once<F> {
#[track_caller]
fn take(&self) -> Box<F> {
self.0.lock().expect("Once::lock()").take().expect("Once::take() called once")
self.0.lock().take().expect("Once::take() called once")
}
}