Skip to content

Commit

Permalink
[style] format crate import style:
Browse files Browse the repository at this point in the history
```rust
mod sub_mod1;
mod sub_mod2;

use core::foo::Bar;
use alloc::bar::Foo;

use ext_crate::bar;

use crate::baz;
use self::sub_mod1::foo;
use super::sup_mod::qux;

pub use ...
```
  • Loading branch information
Azure-stars committed Nov 21, 2024
1 parent 531a50c commit 3d4855c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
//! It will read and parse ELF files.
//!
//! Now these apps are loaded into memory as a part of the kernel image.
use alloc::{collections::btree_map::BTreeMap, vec::Vec};
use core::arch::global_asm;

use alloc::{collections::btree_map::BTreeMap, vec::Vec};
use axhal::paging::MappingFlags;
use memory_addr::{MemoryAddr, VirtAddr};

Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mod loader;
mod mm;
mod syscall_imp;
mod task;

use alloc::sync::Arc;

use axhal::arch::UspaceContext;
Expand Down
5 changes: 2 additions & 3 deletions src/mm.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use alloc::string::ToString;
use axerrno::AxResult;
use memory_addr::VirtAddr;

use axerrno::AxResult;
use axhal::{
paging::MappingFlags,
trap::{register_trap_handler, PAGE_FAULT},
};

use axmm::AddrSpace;
use axtask::TaskExtRef;
use memory_addr::VirtAddr;

use crate::{config, loader};

Expand Down
1 change: 1 addition & 0 deletions src/syscall_imp/task/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod schedule;
mod thread;

pub(crate) use self::schedule::*;
pub(crate) use self::thread::*;
1 change: 0 additions & 1 deletion src/syscall_imp/task/thread.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use arceos_posix_api::{self as api};

use axtask::{current, TaskExtRef};
use num_enum::TryFromPrimitive;

Expand Down
3 changes: 1 addition & 2 deletions src/task.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use core::sync::atomic::AtomicU64;

use alloc::sync::Arc;
use core::sync::atomic::AtomicU64;

use axhal::arch::UspaceContext;
use axmm::AddrSpace;
Expand Down

0 comments on commit 3d4855c

Please sign in to comment.