From 24a51faff266744d83c1ef60328b28906d2b525c Mon Sep 17 00:00:00 2001 From: WangRunji Date: Fri, 16 Nov 2018 00:03:56 +0800 Subject: [PATCH] remove Debug dependency for INode --- src/tests.rs | 13 ------------- src/vfs.rs | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/tests.rs b/src/tests.rs index 682fa3a..1cbbe5a 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -35,19 +35,6 @@ fn create_new_sfs() { let _root = sfs.root_inode(); } -// #[test] -fn print_root() { - let sfs = _open_sample_file(); - let root = sfs.root_inode(); - println!("{:?}", root); - - let files = root.list().unwrap(); - println!("{:?}", files); - assert_eq!(files[3], root.get_entry(3).unwrap()); - - sfs.sync().unwrap(); -} - #[test] fn create_file() -> Result<()> { let sfs = _create_new_sfs(); diff --git a/src/vfs.rs b/src/vfs.rs index d7965a5..f88c657 100644 --- a/src/vfs.rs +++ b/src/vfs.rs @@ -10,7 +10,7 @@ pub trait Device: Send { } /// Abstract operations on a inode. -pub trait INode: Debug + Any + Sync + Send { +pub trait INode: Any + Sync + Send { fn read_at(&self, offset: usize, buf: &mut [u8]) -> Result; fn write_at(&self, offset: usize, buf: &[u8]) -> Result; fn info(&self) -> Result;