kmc-solid: Address compiler warnings

Addresses the warn-by-default lints `unused_imports` and
`unused_unsafe`.
This commit is contained in:
Tomoaki Kawada 2022-12-01 11:03:43 +09:00
parent 47f2f6d615
commit f482e55adf
3 changed files with 4 additions and 5 deletions

View File

@ -71,7 +71,7 @@ impl Condvar {
}
}
unsafe { mutex.lock() };
mutex.lock();
}
pub unsafe fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool {
@ -109,7 +109,7 @@ impl Condvar {
// we woke up because of `notify_*`.
let success = self.waiters.with_locked(|waiters| unsafe { !waiters.remove(waiter) });
unsafe { mutex.lock() };
mutex.lock();
success
}
}

View File

@ -72,7 +72,7 @@ pub(super) struct MutexGuard<'a>(&'a Mutex);
impl<'a> MutexGuard<'a> {
#[inline]
pub(super) fn lock(x: &'a Mutex) -> Self {
unsafe { x.lock() };
x.lock();
Self(x)
}
}

View File

@ -1,7 +1,6 @@
use super::unsupported;
use crate::convert::TryFrom;
use crate::error::Error as StdError;
use crate::ffi::{CStr, CString, OsStr, OsString};
use crate::ffi::{CStr, OsStr, OsString};
use crate::fmt;
use crate::io;
use crate::os::{