From 95d8d84eef645b52d92fd3fb8fdea7aed1f6d474 Mon Sep 17 00:00:00 2001 From: Chuyan Zhang Date: Fri, 17 Nov 2023 11:40:33 -0800 Subject: Layer 1 incomplete --- src/block_device/memory_disk.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/block_device') 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 +} -- cgit v1.2.3-70-g09d2