summaryrefslogtreecommitdiff
path: root/src/block_device
diff options
context:
space:
mode:
authorChuyan Zhang <me@zcy.moe>2023-11-17 11:40:33 -0800
committerChuyan Zhang <me@zcy.moe>2023-11-17 11:40:33 -0800
commit95d8d84eef645b52d92fd3fb8fdea7aed1f6d474 (patch)
treeab65714726edeec94fd35f424e21a1f77da71b3c /src/block_device
parent7a748cadbb2e2ce8c0e045cb8fbd77ccbd47459f (diff)
downloadmyfs-95d8d84eef645b52d92fd3fb8fdea7aed1f6d474.tar.gz
myfs-95d8d84eef645b52d92fd3fb8fdea7aed1f6d474.zip
Layer 1 incomplete
Diffstat (limited to 'src/block_device')
-rw-r--r--src/block_device/memory_disk.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/block_device/memory_disk.rs b/src/block_device/memory_disk.rs
index 4cffaf2..3876736 100644
--- a/src/block_device/memory_disk.rs
+++ b/src/block_device/memory_disk.rs
@@ -1,5 +1,5 @@
+use crate::block_device::{BlockDevice, BLOCK_SIZE};
use std::cell::RefCell;
-use crate::block_device::{BLOCK_SIZE, BlockDevice};
#[repr(C)]
pub struct MemoryDisk {
@@ -14,7 +14,6 @@ impl MemoryDisk {
arena: RefCell::new(vec![0u8; BLOCK_SIZE * 16384]),
}
}
-
}
impl BlockDevice for MemoryDisk {
@@ -31,4 +30,4 @@ impl BlockDevice for MemoryDisk {
let mut arena = self.arena.borrow_mut();
arena[block_front..block_back].copy_from_slice(buffer);
}
-} \ No newline at end of file
+}