Skip to content

Commit 44928a0

Browse files
committed
Cleanup
1 parent 5caaa76 commit 44928a0

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

src/bin/09.rs

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ struct Block {
99
}
1010

1111
impl 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

5450
fn checksum(blocks: &Vec<Block>) -> u64 {
5551
let mut sum: u64 = 0;

0 commit comments

Comments
 (0)