forked from LowLevelDevs/FoundryOS
Fixed most of the clippy warnings/suggestions.
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
use lib_alloc::allocator::FoundryAllocator;
|
||||
// use lib_alloc::allocator::FoundryAllocator;
|
||||
use limine::{memory_map::EntryType, response::MemoryMapResponse};
|
||||
use x86_64::{
|
||||
addr,
|
||||
// addr,
|
||||
registers::control::Cr3,
|
||||
structures::paging::{
|
||||
page_table::FrameError, FrameAllocator, OffsetPageTable, PageTable, PhysFrame, Size4KiB,
|
||||
// page_table::FrameError,
|
||||
FrameAllocator,
|
||||
OffsetPageTable,
|
||||
PageTable,
|
||||
PhysFrame,
|
||||
Size4KiB,
|
||||
},
|
||||
PhysAddr, VirtAddr,
|
||||
PhysAddr,
|
||||
VirtAddr,
|
||||
};
|
||||
|
||||
/// Returns a mutable reference to the current level 4 page table.
|
||||
@@ -93,7 +99,6 @@ unsafe impl FrameAllocator<Size4KiB> for FoundryOSFrameAllocator {
|
||||
///
|
||||
/// - `Some(PhysFrame)`: If a usable frame is available.
|
||||
/// - `None`: If there are no more usable frames to allocate.
|
||||
|
||||
fn allocate_frame(&mut self) -> Option<PhysFrame> {
|
||||
let frame = self.usable_frames().nth(self.next);
|
||||
self.next += 1;
|
||||
|
||||
Reference in New Issue
Block a user