mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
kmc-solid: Address compiler warnings
Addresses the warn-by-default lints `unused_imports` and `unused_unsafe`.
This commit is contained in:
parent
47f2f6d615
commit
f482e55adf
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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::{
|
||||
|
Loading…
Reference in New Issue
Block a user