Appease clippy

This commit is contained in:
Luke Street 2024-04-03 00:18:16 -06:00
parent 3497d38ea3
commit a156c3697f
2 changed files with 2 additions and 6 deletions

View File

@ -428,7 +428,7 @@ where P: AsRef<Path> {
if path.as_ref().exists() {
set_file_mtime(path, FileTime::now())
} else {
match OpenOptions::new().create(true).write(true).open(path) {
match OpenOptions::new().create(true).truncate(true).write(true).open(path) {
Ok(_) => Ok(()),
Err(e) => Err(e),
}

View File

@ -391,11 +391,7 @@ impl<'parent> Iterator for Nodes<'parent> {
type Item = Node;
fn next(&mut self) -> Option<Self::Item> {
let Some(state) = self.stack.pop() else {
return None;
};
match state {
match self.stack.pop()? {
NodeState::Begin(name) => {
self.stack.push(NodeState::File(name.clone(), 0));
Some(Node::DirectoryBegin { name })