From 3b941f23e3d4c55c080249f2ea9b1a417131b696 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:33:03 +0200 Subject: [PATCH] [No-auto] bin/domain/habit: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- bin/domain/imag-habit/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/domain/imag-habit/src/main.rs b/bin/domain/imag-habit/src/main.rs index b560e892..34c44959 100644 --- a/bin/domain/imag-habit/src/main.rs +++ b/bin/domain/imag-habit/src/main.rs @@ -180,8 +180,8 @@ fn delete(rt: &Runtime) { .trace_unwrap_exit() .map(|sid| (sid.clone(), rt.store().get(sid).map_err_trace_exit_unwrap())) // get the FileLockEntry .filter(|&(_, ref habit)| match habit { // filter for name of habit == name we look for - &Some(ref h) => h.habit_name().map_err_trace_exit_unwrap() == name, - &None => false, + Some(ref h) => h.habit_name().map_err_trace_exit_unwrap() == name, + None => false, }) .filter_map(|(a, o)| o.map(|x| (a, x))) // map: (a, Option) -> Option<(a, b)> -> (a, b) .map(|(sid, fle)| { @@ -610,7 +610,7 @@ fn done(rt: &Runtime) { } /// Helper function for `Iterator::filter_map()`ing `all_habit_templates()` and `Store::get` them. -fn get_from_store<'a>(store: &'a Store, id: StoreId) -> Option> { +fn get_from_store(store: &Store, id: StoreId) -> Option> { match store.get(id.clone()) { Ok(Some(h)) => Some(h), Ok(None) => {