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
+2 -2
View File
@@ -35,7 +35,7 @@ static KERNEL_ADDRESS_REQUEST: KernelAddressRequest = KernelAddressRequest::new(
/// ```
///
/// Returns (virtual_base, physical_base)
pub static KERNEL_PHYSICAL_MEMORY_OFFSET: Lazy<(u64, u64)> = Lazy::new(|| {
pub static _KERNEL_PHYSICAL_MEMORY_OFFSET: Lazy<(u64, u64)> = Lazy::new(|| {
let resp = KERNEL_ADDRESS_REQUEST.get_response().unwrap();
// These are base addresses, using Limine's built in page table.
@@ -49,7 +49,7 @@ pub static KERNEL_PHYSICAL_MEMORY_OFFSET: Lazy<(u64, u64)> = Lazy::new(|| {
/// Panics if the memory map was not found in MEMORY_MAP_REQUEST.
pub fn get_memory_map() -> &'static MemoryMapResponse {
if let Some(memory_map) = MEMORY_MAP_REQUEST.get_response() {
return memory_map;
memory_map
} else {
unreachable!("Could not fetch memory map from Limine.")
}