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() { if path.as_ref().exists() {
set_file_mtime(path, FileTime::now()) set_file_mtime(path, FileTime::now())
} else { } else {
match OpenOptions::new().create(true).write(true).open(path) { match OpenOptions::new().create(true).truncate(true).write(true).open(path) {
Ok(_) => Ok(()), Ok(_) => Ok(()),
Err(e) => Err(e), Err(e) => Err(e),
} }

View File

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