diff --git a/src/bin/p07.rs b/src/bin/p07.rs index 1f2731e..7ee9e65 100644 --- a/src/bin/p07.rs +++ b/src/bin/p07.rs @@ -168,8 +168,8 @@ impl State { } fn process_result(&mut self, res: Listing) { - let filename = clean(&self.cur_path.join(res.path()).to_string_lossy()); - if let Listing::File(_, size) = res { + if let Listing::File(path, size) = res { + let filename = clean(&self.cur_path.join(path).to_string_lossy()); self.filesystem.insert(filename, size); } }