Meaningful changes from aggressive-clippy

I do want to enable a few specific lints, yet aggressive-clippy as a whole
isn't worthwhile.
This commit is contained in:
Luke Parker
2023-07-08 11:29:05 -04:00
parent 3c6cc42c23
commit 93b1656f86
39 changed files with 127 additions and 143 deletions

View File

@@ -1,4 +1,5 @@
pub use core::sync::*;
pub use alloc::sync::*;
mod mutex_shim {
#[cfg(feature = "std")]
@@ -57,7 +58,7 @@ mod oncelock_shim {
let mut lock = self.0.lock();
if !*lock {
unsafe {
(core::ptr::addr_of!(self.1) as *mut Option<_>).write_unaligned(Some(f()));
core::ptr::addr_of!(self.1).cast_mut().write_unaligned(Some(f()));
}
}
*lock = true;