Fix clippy.sh script and fix a number of clippy warnings

This commit is contained in:
Jeremy Soller
2019-10-06 11:04:06 -06:00
parent a57ea6a72b
commit 63e2a835e0
40 changed files with 196 additions and 543 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
use core::alloc::{AllocErr, GlobalAlloc, Layout};
use core::ptr::NonNull;
use core::ptr::{self, NonNull};
use linked_list_allocator::Heap;
use spin::Mutex;
@@ -40,7 +40,7 @@ unsafe impl GlobalAlloc for Allocator {
panic!("__rust_allocate: heap not initialized");
}
},
other => return other.ok().map_or(0 as *mut u8, |allocation| allocation.as_ptr()),
other => return other.ok().map_or(ptr::null_mut(), |allocation| allocation.as_ptr()),
}
}
}