From 9f59478da06db1946c8bc2db0ae75475c213f3dc Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 5 Dec 2015 11:10:54 +0100 Subject: [PATCH] Readability fixes --- src/module/bm/commands.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/module/bm/commands.rs b/src/module/bm/commands.rs index c72266d1..09d52c44 100644 --- a/src/module/bm/commands.rs +++ b/src/module/bm/commands.rs @@ -137,7 +137,8 @@ fn get_filtered_files_from_backend<'a>(module: &'a Module, let parser = Parser::new(JsonHeaderParser::new(None)); let tags = get_tags(env.rt, env.matches); debug!("Tags: {:?}", tags); - env.bk.iter_files(module, &parser) + env.bk + .iter_files(module, &parser) .map(|files| { files.filter(|file| { debug!("Backend returns file: {:?}", file); @@ -145,9 +146,11 @@ fn get_filtered_files_from_backend<'a>(module: &'a Module, }).filter(|file| { debug!("Checking matches of: {:?}", file.id()); get_matcher(env.rt, env.matches) - .and_then(|r| Some(file.matches_with(&r))) + .map(|r| file.matches_with(&r)) .unwrap_or(true) - }).collect::>().into_iter() + }) + .collect::>() + .into_iter() }).map_err(|e| { debug!("Error from Backend: {:?}", e); let mut merr = ModuleError::new("Could not filter files");