Fix clippy errors
This commit is contained in:
@@ -48,9 +48,8 @@ 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() {
|
||||
memory_map
|
||||
} else {
|
||||
unreachable!("Could not fetch memory map from Limine.")
|
||||
}
|
||||
MEMORY_MAP_REQUEST.get_response().map_or_else(
|
||||
|| unreachable!("Could not fetch memory map from Limine."),
|
||||
|memory_map| memory_map,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user