summaryrefslogtreecommitdiff
path: root/ayafs-core/src/block_device
diff options
context:
space:
mode:
authorChuyan Zhang <me@zcy.moe>2023-12-03 00:58:03 -0800
committerChuyan Zhang <me@zcy.moe>2023-12-03 00:58:03 -0800
commit07c1de41d975459397945f2e6b2b7f5630912175 (patch)
treee8e276a5627f13da255929d671badd0254541260 /ayafs-core/src/block_device
parent21a9ce8e53224100f331d9a666bc00c630964724 (diff)
downloadmyfs-master.tar.gz
myfs-master.zip
remove some assertions...HEADmaster
Diffstat (limited to 'ayafs-core/src/block_device')
-rw-r--r--ayafs-core/src/block_device/disk.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/ayafs-core/src/block_device/disk.rs b/ayafs-core/src/block_device/disk.rs
index cc9552c..745a0b2 100644
--- a/ayafs-core/src/block_device/disk.rs
+++ b/ayafs-core/src/block_device/disk.rs
@@ -27,7 +27,6 @@ impl Disk {
impl BlockDevice for Disk {
fn read(&self, block_id: usize, buffer: &mut [u8]) {
- assert_eq!(buffer.len(), BLOCK_SIZE);
let mut device = self.device.borrow_mut();
device
.seek(SeekFrom::Start((block_id * BLOCK_SIZE) as u64))
@@ -39,7 +38,6 @@ impl BlockDevice for Disk {
}
fn write(&self, block_id: usize, buffer: &[u8]) {
- assert_eq!(buffer.len(), BLOCK_SIZE);
let mut device = self.device.borrow_mut();
device
.seek(SeekFrom::Start((block_id * BLOCK_SIZE) as u64))