diff options
author | Chuyan Zhang <me@zcy.moe> | 2023-11-17 11:40:33 -0800 |
---|---|---|
committer | Chuyan Zhang <me@zcy.moe> | 2023-11-17 11:40:33 -0800 |
commit | 95d8d84eef645b52d92fd3fb8fdea7aed1f6d474 (patch) | |
tree | ab65714726edeec94fd35f424e21a1f77da71b3c /src/block_device | |
parent | 7a748cadbb2e2ce8c0e045cb8fbd77ccbd47459f (diff) | |
download | myfs-95d8d84eef645b52d92fd3fb8fdea7aed1f6d474.tar.gz myfs-95d8d84eef645b52d92fd3fb8fdea7aed1f6d474.zip |
Layer 1 incomplete
Diffstat (limited to 'src/block_device')
-rw-r--r-- | src/block_device/memory_disk.rs | 5 |
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 +} |