File tree Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,6 @@ struct Block {
9
9
}
10
10
11
11
impl Block {
12
- fn is_file ( & self ) -> bool {
13
- self . file_id . is_some ( )
14
- }
15
-
16
12
fn is_free ( & self ) -> bool {
17
13
self . file_id . is_none ( )
18
14
}
@@ -35,21 +31,21 @@ impl Block {
35
31
}
36
32
}
37
33
38
- struct BlocksFmt < ' a > ( & ' a Vec < Block > ) ;
39
-
40
- impl Debug for BlocksFmt < ' _ > {
41
- fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
42
- for block in self . 0 {
43
- for _ in 0 ..block. length {
44
- match block. file_id {
45
- Some ( id) => write ! ( f, "{}" , id) ?,
46
- None => write ! ( f, "." ) ?,
47
- }
48
- }
49
- }
50
- Ok ( ( ) )
51
- }
52
- }
34
+ // struct BlocksFmt<'a>(&'a Vec<Block>);
35
+
36
+ // impl Debug for BlocksFmt<'_> {
37
+ // fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
38
+ // for block in self.0 {
39
+ // for _ in 0..block.length {
40
+ // match block.file_id {
41
+ // Some(id) => write!(f, "{}", id)?,
42
+ // None => write!(f, ".")?,
43
+ // }
44
+ // }
45
+ // }
46
+ // Ok(())
47
+ // }
48
+ // }
53
49
54
50
fn checksum ( blocks : & Vec < Block > ) -> u64 {
55
51
let mut sum: u64 = 0 ;
You can’t perform that action at this time.
0 commit comments