Appease clippy
This commit is contained in:
parent
3497d38ea3
commit
a156c3697f
|
@ -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),
|
||||
}
|
||||
|
|
|
@ -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 })
|
||||
|
|
Loading…
Reference in New Issue