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