Skip to content

Commit 51f8467

Browse files
committed
fix cargo fmt warning
Signed-off-by: Weikang Guo <guoweikang@kylinos.cn>
1 parent dbe443e commit 51f8467

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

api/src/mm.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ use axhal::{
1515
use axio::prelude::*;
1616
use axtask::current;
1717
use memory_addr::{MemoryAddr, PAGE_SIZE_4K, VirtAddr};
18-
use starry_core::{
19-
mm::access_user_memory,
20-
task::AsThread,
21-
};
18+
use starry_core::{mm::access_user_memory, task::AsThread};
2219
use starry_vm::{vm_load_until_nul, vm_read_slice, vm_write_slice};
2320

2421
fn check_region(start: VirtAddr, layout: Layout, access_flags: MappingFlags) -> AxResult<()> {

core/src/mm.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
//! User address space management.
22
33
use alloc::{borrow::ToOwned, string::String, vec, vec::Vec};
4-
use core::{
5-
ffi::CStr,
6-
hint::unlikely,
7-
iter,
8-
mem::MaybeUninit,
9-
};
4+
use core::{ffi::CStr, hint::unlikely, iter, mem::MaybeUninit};
105

116
use axerrno::{AxError, AxResult};
127
use axfs::{CachedFile, FS_CONTEXT, FileBackend};

core/src/task.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ pub struct Thread {
8585

8686
/// Indicates whether the thread is currently accessing user memory.
8787
accessing_user_memory: AtomicBool,
88-
8988
}
9089

9190
impl Thread {
@@ -155,7 +154,6 @@ impl Thread {
155154
self.accessing_user_memory
156155
.store(accessing, Ordering::Release);
157156
}
158-
159157
}
160158

161159
#[extern_trait]

0 commit comments

Comments
 (0)