2022 rust day 7 refactor
This commit is contained in:
parent
276b515e6d
commit
1b17aab1bc
|
@ -46,9 +46,7 @@ fn cli_to_tree(data: &[CliEntry]) -> Box<Node> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
current = &mut *current.subdirs.iter_mut()
|
current = current.subdirs.iter_mut().find(|dir| dir.name == name).unwrap();
|
||||||
.find(|next| next.name == name)
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CliEntry::Ls => {},
|
CliEntry::Ls => {},
|
||||||
|
|
Loading…
Reference in a new issue