From 33f4b33d61f0fb8c61cd5eaa2aa3c98d473ed24d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 10 Feb 2017 17:00:25 +0100 Subject: [PATCH] Remove scope and indentation level --- libimagstore/src/store.rs | 63 ++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 505f3ca9..c27af3c1 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -358,42 +358,43 @@ impl Store { WalkDir::new(self.location.clone()) .into_iter() - .all(|res| { - match res { - Ok(dent) => { - if dent.file_type().is_file() { - match self.get(PathBuf::from(dent.path())) { - Ok(Some(fle)) => { - let p = fle.get_location(); - let content_len = fle.get_content().len(); - let header = if fle.get_header().verify().is_ok() { - "ok" - } else { - "broken" - }; + .all(|res| match res { + Ok(dent) => { + if dent.file_type().is_file() { + match self.get(PathBuf::from(dent.path())) { + Ok(Some(fle)) => { + let p = fle.get_location(); + let content_len = fle.get_content().len(); + let header = if fle.get_header().verify().is_ok() { + "ok" + } else { + "broken" + }; - info!("{: >6} | {: >14} | {:?}", header, content_len, p.deref()); - }, + info!("{: >6} | {: >14} | {:?}", header, content_len, p.deref()); + true + }, - Ok(None) => { - info!("{: >6} | {: >14} | {:?}", "?", "couldn't load", dent.path()); - }, + Ok(None) => { + info!("{: >6} | {: >14} | {:?}", "?", "couldn't load", dent.path()); + true + }, - Err(e) => { - debug!("{:?}", e); - }, - } - } else { - info!("{: >6} | {: >14} | {:?}", "?", "", dent.path()); + Err(e) => { + debug!("{:?}", e); + false + }, } - }, + } else { + info!("{: >6} | {: >14} | {:?}", "?", "", dent.path()); + true + } + }, - Err(e) => { - debug!("{:?}", e); - }, - } - - true + Err(e) => { + debug!("{:?}", e); + false + }, }) }