Skip to content

Commit f482e55

Browse files
committed
kmc-solid: Address compiler warnings
Addresses the warn-by-default lints `unused_imports` and `unused_unsafe`.
1 parent 47f2f6d commit f482e55

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

library/std/src/sys/itron/condvar.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl Condvar {
7171
}
7272
}
7373

74-
unsafe { mutex.lock() };
74+
mutex.lock();
7575
}
7676

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

112-
unsafe { mutex.lock() };
112+
mutex.lock();
113113
success
114114
}
115115
}

library/std/src/sys/itron/mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub(super) struct MutexGuard<'a>(&'a Mutex);
7272
impl<'a> MutexGuard<'a> {
7373
#[inline]
7474
pub(super) fn lock(x: &'a Mutex) -> Self {
75-
unsafe { x.lock() };
75+
x.lock();
7676
Self(x)
7777
}
7878
}

library/std/src/sys/solid/os.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use super::unsupported;
2-
use crate::convert::TryFrom;
32
use crate::error::Error as StdError;
4-
use crate::ffi::{CStr, CString, OsStr, OsString};
3+
use crate::ffi::{CStr, OsStr, OsString};
54
use crate::fmt;
65
use crate::io;
76
use crate::os::{

0 commit comments

Comments
 (0)