diff --git a/framework/aster-frame/src/vm/memory_set.rs b/framework/aster-frame/src/vm/memory_set.rs index e5f89821d..7c2a27cac 100644 --- a/framework/aster-frame/src/vm/memory_set.rs +++ b/framework/aster-frame/src/vm/memory_set.rs @@ -8,8 +8,8 @@ use crate::{ arch::mm::{PageTableEntry, PageTableFlags}, prelude::*, vm::{ - is_page_aligned, VmAllocOptions, VmFrame, VmFrameVec, VmReader, VmWriter, - PHYS_MEM_BASE_VADDR, PAGE_SIZE, + is_page_aligned, VmAllocOptions, VmFrame, VmFrameVec, VmReader, VmWriter, PAGE_SIZE, + PHYS_MEM_BASE_VADDR, }, Error, }; diff --git a/framework/aster-frame/src/vm/mod.rs b/framework/aster-frame/src/vm/mod.rs index cfa211ba4..9066adf4d 100644 --- a/framework/aster-frame/src/vm/mod.rs +++ b/framework/aster-frame/src/vm/mod.rs @@ -37,7 +37,7 @@ use crate::boot::memory_region::{MemoryRegion, MemoryRegionType}; pub const PAGE_SIZE: usize = 0x1000; /// The maximum virtual address of user space (non inclusive). -/// +/// /// Typicall 64-bit systems have at least 48-bit virtual address space. /// A typical way to reserve half of the address space for the kernel is /// to use the highest 48-bit virtual address space. @@ -49,7 +49,7 @@ pub const PAGE_SIZE: usize = 0x1000; pub const MAX_USERSPACE_VADDR: Vaddr = 0x0000_8000_0000_0000 - PAGE_SIZE; /// Start of the kernel address space. -/// +/// /// This is the _lowest_ address of the x86-64's _high_ canonical addresses. /// /// This is also the base address of the direct mapping of all physical diff --git a/osdk/tests/examples_in_book/work_in_workspace.rs b/osdk/tests/examples_in_book/work_in_workspace.rs index c3467b2d8..2b465cd59 100644 --- a/osdk/tests/examples_in_book/work_in_workspace.rs +++ b/osdk/tests/examples_in_book/work_in_workspace.rs @@ -40,7 +40,9 @@ fn work_in_workspace() { .open(&module_src_path) .unwrap(); module_src_file - .write_all(include_bytes!("work_in_workspace_templates/mymodule/src/lib.rs")) + .write_all(include_bytes!( + "work_in_workspace_templates/mymodule/src/lib.rs" + )) .unwrap(); module_src_file.flush().unwrap(); @@ -52,14 +54,20 @@ fn work_in_workspace() { .open(&kernel_manifest_path) .unwrap(); kernel_manifest_file - .write_all(include_bytes!("work_in_workspace_templates/myos/Cargo.toml")) + .write_all(include_bytes!( + "work_in_workspace_templates/myos/Cargo.toml" + )) .unwrap(); kernel_manifest_file.flush().unwrap(); // Add the content to myos/src/lib.rs let kernel_src_path = workspace_dir.join(kernel).join("src").join("lib.rs"); assert!(kernel_src_path.is_file()); - fs::write(&kernel_src_path, include_str!("work_in_workspace_templates/myos/src/lib.rs")).unwrap(); + fs::write( + &kernel_src_path, + include_str!("work_in_workspace_templates/myos/src/lib.rs"), + ) + .unwrap(); // Run subcommand build & run cargo_osdk(&["build"]).ok().unwrap(); diff --git a/tools/format_all.sh b/tools/format_all.sh index 707c8c80c..c66baa29f 100755 --- a/tools/format_all.sh +++ b/tools/format_all.sh @@ -2,6 +2,8 @@ # SPDX-License-Identifier: MPL-2.0 +set -e + WORKSPACE_ROOT="$(dirname "$(readlink -f "$0")")/.." EXCLUDED_CRATES=$(sed -n '/^\[workspace\]/,/^\[.*\]/{/exclude = \[/,/\]/p}' "$WORKSPACE_ROOT/Cargo.toml" | grep -v "exclude = \[" | tr -d '", \]')