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
+3 -6
View File
@@ -46,7 +46,7 @@ pub struct MemoryAreaIter {
impl MemoryAreaIter {
fn new(_type: u32) -> Self {
MemoryAreaIter {
_type: _type,
_type,
i: 0
}
}
@@ -73,7 +73,7 @@ static ALLOCATOR: Mutex<Option<RecycleAllocator<BumpAllocator>>> = Mutex::new(No
pub unsafe fn init(kernel_start: usize, kernel_end: usize) {
// Copy memory map from bootloader location
for (i, entry) in MEMORY_MAP.iter_mut().enumerate() {
*entry = *(0x500 as *const MemoryArea).offset(i as isize);
*entry = *(0x500 as *const MemoryArea).add(i);
if entry._type != MEMORY_AREA_NULL {
println!("{:?}", entry);
}
@@ -157,10 +157,7 @@ impl Frame {
//TODO: Set private
pub fn range_inclusive(start: Frame, end: Frame) -> FrameIter {
FrameIter {
start: start,
end: end,
}
FrameIter { start, end }
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ pub struct RecycleAllocator<T: FrameAllocator> {
impl<T: FrameAllocator> RecycleAllocator<T> {
pub fn new(inner: T) -> Self {
Self {
inner: inner,
inner,
noncore: false,
free: Vec::new(),
}