Fixed most of the clippy warnings/suggestions.

This commit is contained in:
2025-02-23 02:05:13 +00:00
parent e722874cee
commit c2c552ef25
5 changed files with 28 additions and 30 deletions
+10 -5
View File
@@ -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;