Merge pull request #1175 from matthiasbeyer/libimaghabit/remove-unused
libimaghabit: Remove unused things
This commit is contained in:
commit
09c9eb6090
5 changed files with 3 additions and 21 deletions
|
@ -29,14 +29,12 @@ use error::HabitErrorKind as HEK;
|
||||||
use error::*;
|
use error::*;
|
||||||
use iter::HabitInstanceStoreIdIterator;
|
use iter::HabitInstanceStoreIdIterator;
|
||||||
use util::date_to_string;
|
use util::date_to_string;
|
||||||
use util::date_from_string;
|
|
||||||
use util::IsHabitCheck;
|
use util::IsHabitCheck;
|
||||||
|
|
||||||
use libimagentrylink::internal::InternalLinker;
|
use libimagentrylink::internal::InternalLinker;
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
use libimagstore::iter::get::StoreIdGetIteratorExtension;
|
|
||||||
use libimagstore::storeid::StoreId;
|
use libimagstore::storeid::StoreId;
|
||||||
use libimagstore::storeid::IntoStoreId;
|
use libimagstore::storeid::IntoStoreId;
|
||||||
use libimagstore::storeid::StoreIdIterator;
|
use libimagstore::storeid::StoreIdIterator;
|
||||||
|
@ -188,7 +186,7 @@ impl HabitTemplate for Entry {
|
||||||
"habit.template.name",
|
"habit.template.name",
|
||||||
"habit.template.basedate",
|
"habit.template.basedate",
|
||||||
"habit.template.comment",
|
"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()
|
self.get_header()
|
||||||
.read(path)
|
.read(path)
|
||||||
.map(|o| is_match!(o, Some(&Value::String(_))))
|
.map(|o| is_match!(o, Some(&Value::String(_))))
|
||||||
|
@ -253,7 +251,6 @@ pub mod builder {
|
||||||
use error::HabitErrorKind as HEK;
|
use error::HabitErrorKind as HEK;
|
||||||
use error::*;
|
use error::*;
|
||||||
use util::date_to_string;
|
use util::date_to_string;
|
||||||
use util::date_from_string;
|
|
||||||
|
|
||||||
pub struct HabitBuilder {
|
pub struct HabitBuilder {
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
|
|
|
@ -22,10 +22,8 @@ use toml::Value;
|
||||||
use toml_query::read::TomlValueReadExt;
|
use toml_query::read::TomlValueReadExt;
|
||||||
use toml_query::set::TomlValueSetExt;
|
use toml_query::set::TomlValueSetExt;
|
||||||
|
|
||||||
use error::HabitError as HE;
|
|
||||||
use error::HabitErrorKind as HEK;
|
use error::HabitErrorKind as HEK;
|
||||||
use error::*;
|
use error::*;
|
||||||
use habit::HabitTemplate;
|
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
|
@ -54,7 +52,7 @@ impl HabitInstance for Entry {
|
||||||
"habit.instance.name",
|
"habit.instance.name",
|
||||||
"habit.instance.date",
|
"habit.instance.date",
|
||||||
"habit.instance.comment",
|
"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()
|
self.get_header()
|
||||||
.read(path)
|
.read(path)
|
||||||
.map(|o| is_match!(o, Some(&Value::String(_))))
|
.map(|o| is_match!(o, Some(&Value::String(_))))
|
||||||
|
|
|
@ -17,17 +17,9 @@
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// 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::StoreIdIterator;
|
||||||
use libimagstore::storeid::StoreId;
|
use libimagstore::storeid::StoreId;
|
||||||
|
|
||||||
use error::HabitError as HE;
|
|
||||||
use error::HabitErrorKind as HEK;
|
|
||||||
use error::*;
|
|
||||||
use util::IsHabitCheck;
|
use util::IsHabitCheck;
|
||||||
|
|
||||||
pub struct HabitTemplateStoreIdIterator(StoreIdIterator);
|
pub struct HabitTemplateStoreIdIterator(StoreIdIterator);
|
||||||
|
|
|
@ -25,8 +25,8 @@ extern crate kairos;
|
||||||
#[macro_use] extern crate error_chain;
|
#[macro_use] extern crate error_chain;
|
||||||
#[macro_use] extern crate is_match;
|
#[macro_use] extern crate is_match;
|
||||||
|
|
||||||
#[macro_use] extern crate libimagerror;
|
|
||||||
#[macro_use] extern crate libimagstore;
|
#[macro_use] extern crate libimagstore;
|
||||||
|
extern crate libimagerror;
|
||||||
extern crate libimagentryedit;
|
extern crate libimagentryedit;
|
||||||
extern crate libimagentrylink;
|
extern crate libimagentrylink;
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,12 @@
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
//
|
//
|
||||||
|
|
||||||
use chrono::NaiveDate;
|
|
||||||
|
|
||||||
use error::Result;
|
use error::Result;
|
||||||
use error::HabitError as HE;
|
|
||||||
use habit::builder::HabitBuilder;
|
use habit::builder::HabitBuilder;
|
||||||
use iter::HabitTemplateStoreIdIterator;
|
use iter::HabitTemplateStoreIdIterator;
|
||||||
use iter::HabitInstanceStoreIdIterator;
|
use iter::HabitInstanceStoreIdIterator;
|
||||||
|
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
use libimagstore::store::FileLockEntry;
|
|
||||||
use libimagstore::storeid::StoreIdIterator;
|
|
||||||
|
|
||||||
/// Extension trait for libimagstore::store::Store which is basically our Habit-Store
|
/// Extension trait for libimagstore::store::Store which is basically our Habit-Store
|
||||||
pub trait HabitStore {
|
pub trait HabitStore {
|
||||||
|
|
Loading…
Reference in a new issue