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,42 +358,43 @@ 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())) { Ok(Some(fle)) => {
Ok(Some(fle)) => { let p = fle.get_location();
let p = fle.get_location(); let content_len = fle.get_content().len();
let content_len = fle.get_content().len(); let header = if fle.get_header().verify().is_ok() {
let header = if fle.get_header().verify().is_ok() { "ok"
"ok" } else {
} else { "broken"
"broken" };
};
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 {
info!("{: >6} | {: >14} | {:?}", "?", "<no file>", dent.path());
} }
}, } else {
info!("{: >6} | {: >14} | {:?}", "?", "<no file>", dent.path());
true
}
},
Err(e) => { Err(e) => {
debug!("{:?}", e); debug!("{:?}", e);
}, false
} },
true
}) })
} }