From 96b51280aba93ce9d92af72270839fb2eed3367f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 22 Dec 2017 11:01:35 +0100 Subject: [PATCH 1/3] Remove unused imports --- lib/domain/libimaghabit/src/habit.rs | 3 --- lib/domain/libimaghabit/src/instance.rs | 2 -- lib/domain/libimaghabit/src/iter.rs | 8 -------- lib/domain/libimaghabit/src/store.rs | 5 ----- 4 files changed, 18 deletions(-) diff --git a/lib/domain/libimaghabit/src/habit.rs b/lib/domain/libimaghabit/src/habit.rs index 867f04cf..ee9c1eee 100644 --- a/lib/domain/libimaghabit/src/habit.rs +++ b/lib/domain/libimaghabit/src/habit.rs @@ -29,14 +29,12 @@ use error::HabitErrorKind as HEK; use error::*; use iter::HabitInstanceStoreIdIterator; use util::date_to_string; -use util::date_from_string; use util::IsHabitCheck; use libimagentrylink::internal::InternalLinker; use libimagstore::store::Store; use libimagstore::store::FileLockEntry; use libimagstore::store::Entry; -use libimagstore::iter::get::StoreIdGetIteratorExtension; use libimagstore::storeid::StoreId; use libimagstore::storeid::IntoStoreId; use libimagstore::storeid::StoreIdIterator; @@ -234,7 +232,6 @@ pub mod builder { use error::HabitErrorKind as HEK; use error::*; use util::date_to_string; - use util::date_from_string; pub struct HabitBuilder { name: Option, diff --git a/lib/domain/libimaghabit/src/instance.rs b/lib/domain/libimaghabit/src/instance.rs index ae2aee6d..9a58207a 100644 --- a/lib/domain/libimaghabit/src/instance.rs +++ b/lib/domain/libimaghabit/src/instance.rs @@ -22,10 +22,8 @@ use toml::Value; use toml_query::read::TomlValueReadExt; use toml_query::set::TomlValueSetExt; -use error::HabitError as HE; use error::HabitErrorKind as HEK; use error::*; -use habit::HabitTemplate; use util::*; use libimagstore::store::Entry; diff --git a/lib/domain/libimaghabit/src/iter.rs b/lib/domain/libimaghabit/src/iter.rs index 4fcf7f14..9d5d740f 100644 --- a/lib/domain/libimaghabit/src/iter.rs +++ b/lib/domain/libimaghabit/src/iter.rs @@ -17,17 +17,9 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // -use toml::Value; -use toml_query::read::TomlValueReadExt; - -use libimagstore::store::FileLockEntry; -use libimagstore::store::Store; use libimagstore::storeid::StoreIdIterator; use libimagstore::storeid::StoreId; -use error::HabitError as HE; -use error::HabitErrorKind as HEK; -use error::*; use util::IsHabitCheck; pub struct HabitTemplateStoreIdIterator(StoreIdIterator); diff --git a/lib/domain/libimaghabit/src/store.rs b/lib/domain/libimaghabit/src/store.rs index 5d30c03d..563ac29a 100644 --- a/lib/domain/libimaghabit/src/store.rs +++ b/lib/domain/libimaghabit/src/store.rs @@ -17,17 +17,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // -use chrono::NaiveDate; - use error::Result; -use error::HabitError as HE; use habit::builder::HabitBuilder; use iter::HabitTemplateStoreIdIterator; use iter::HabitInstanceStoreIdIterator; use libimagstore::store::Store; -use libimagstore::store::FileLockEntry; -use libimagstore::storeid::StoreIdIterator; /// Extension trait for libimagstore::store::Store which is basically our Habit-Store pub trait HabitStore { From 90ed0c0e102091a65ebae642a1d6f7d0f2b8fc31 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 22 Dec 2017 11:02:55 +0100 Subject: [PATCH 2/3] Remove unused macro import --- lib/domain/libimaghabit/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/domain/libimaghabit/src/lib.rs b/lib/domain/libimaghabit/src/lib.rs index 6cf5e819..62e18f45 100644 --- a/lib/domain/libimaghabit/src/lib.rs +++ b/lib/domain/libimaghabit/src/lib.rs @@ -25,8 +25,8 @@ extern crate kairos; #[macro_use] extern crate error_chain; #[macro_use] extern crate is_match; -#[macro_use] extern crate libimagerror; #[macro_use] extern crate libimagstore; +extern crate libimagerror; extern crate libimagentryedit; extern crate libimagentrylink; From 9bf4b9604b54ce5d9624cf0114e85e545c6054ee Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 22 Dec 2017 11:03:42 +0100 Subject: [PATCH 3/3] Remove unused variables --- lib/domain/libimaghabit/src/habit.rs | 2 +- lib/domain/libimaghabit/src/instance.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/domain/libimaghabit/src/habit.rs b/lib/domain/libimaghabit/src/habit.rs index ee9c1eee..fe113969 100644 --- a/lib/domain/libimaghabit/src/habit.rs +++ b/lib/domain/libimaghabit/src/habit.rs @@ -171,7 +171,7 @@ impl HabitTemplate for Entry { "habit.template.name", "habit.template.basedate", "habit.template.comment", - ].iter().fold(Ok(true), |acc, path| acc.and_then(|b| { + ].iter().fold(Ok(true), |acc, path| acc.and_then(|_| { self.get_header() .read(path) .map(|o| is_match!(o, Some(&Value::String(_)))) diff --git a/lib/domain/libimaghabit/src/instance.rs b/lib/domain/libimaghabit/src/instance.rs index 9a58207a..84bd9b5c 100644 --- a/lib/domain/libimaghabit/src/instance.rs +++ b/lib/domain/libimaghabit/src/instance.rs @@ -52,7 +52,7 @@ impl HabitInstance for Entry { "habit.instance.name", "habit.instance.date", "habit.instance.comment", - ].iter().fold(Ok(true), |acc, path| acc.and_then(|b| { + ].iter().fold(Ok(true), |acc, path| acc.and_then(|_| { self.get_header() .read(path) .map(|o| is_match!(o, Some(&Value::String(_))))