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 {
99}
1010
1111impl Block {
12- fn is_file ( & self ) -> bool {
13- self . file_id . is_some ( )
14- }
15-
1612 fn is_free ( & self ) -> bool {
1713 self . file_id . is_none ( )
1814 }
@@ -35,21 +31,21 @@ impl Block {
3531 }
3632}
3733
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+ // }
5349
5450fn checksum ( blocks : & Vec < Block > ) -> u64 {
5551 let mut sum: u64 = 0 ;
You can’t perform that action at this time.
0 commit comments