mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Run rustfmt
This commit is contained in:
@@ -20,9 +20,7 @@ pub unsafe fn init(level_4_table_addr: usize) -> RecursivePageTable<'static> {
|
|||||||
|
|
||||||
/// Returns the physical address for the given virtual address, or `None` if
|
/// Returns the physical address for the given virtual address, or `None` if
|
||||||
/// the virtual address is not mapped.
|
/// the virtual address is not mapped.
|
||||||
pub fn translate_addr(addr: u64, recursive_page_table: &RecursivePageTable)
|
pub fn translate_addr(addr: u64, recursive_page_table: &RecursivePageTable) -> Option<PhysAddr> {
|
||||||
-> Option<PhysAddr>
|
|
||||||
{
|
|
||||||
let addr = VirtAddr::new(addr);
|
let addr = VirtAddr::new(addr);
|
||||||
let page: Page = Page::containing_address(addr);
|
let page: Page = Page::containing_address(addr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user