Fixed most of the clippy warnings/suggestions.
This commit is contained in:
@@ -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.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user