Remove scope and indentation level

This commit is contained in:
Matthias Beyer 2017-02-10 17:00:25 +01:00
parent aea81e5df5
commit 33f4b33d61

View file

@ -358,8 +358,7 @@ impl Store {
WalkDir::new(self.location.clone()) WalkDir::new(self.location.clone())
.into_iter() .into_iter()
.all(|res| { .all(|res| match res {
match res {
Ok(dent) => { Ok(dent) => {
if dent.file_type().is_file() { if dent.file_type().is_file() {
match self.get(PathBuf::from(dent.path())) { match self.get(PathBuf::from(dent.path())) {
@ -373,27 +372,29 @@ impl Store {
}; };
info!("{: >6} | {: >14} | {:?}", header, content_len, p.deref()); info!("{: >6} | {: >14} | {:?}", header, content_len, p.deref());
true
}, },
Ok(None) => { Ok(None) => {
info!("{: >6} | {: >14} | {:?}", "?", "couldn't load", dent.path()); info!("{: >6} | {: >14} | {:?}", "?", "couldn't load", dent.path());
true
}, },
Err(e) => { Err(e) => {
debug!("{:?}", e); debug!("{:?}", e);
false
}, },
} }
} else { } else {
info!("{: >6} | {: >14} | {:?}", "?", "<no file>", dent.path()); info!("{: >6} | {: >14} | {:?}", "?", "<no file>", dent.path());
true
} }
}, },
Err(e) => { Err(e) => {
debug!("{:?}", e); debug!("{:?}", e);
false
}, },
}
true
}) })
} }