From bbb4866fa0ada4084c0ff1131d515f70636ccb2f Mon Sep 17 00:00:00 2001 From: mario Date: Thu, 30 Jun 2016 19:06:26 +0200 Subject: [PATCH] reduce warnings lib --- libimagtodo/src/error.rs | 3 +-- libimagtodo/src/lib.rs | 2 +- libimagtodo/src/result.rs | 2 +- libimagtodo/src/task.rs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libimagtodo/src/error.rs b/libimagtodo/src/error.rs index d4be3a4d..58fe7758 100644 --- a/libimagtodo/src/error.rs +++ b/libimagtodo/src/error.rs @@ -1,8 +1,7 @@ use std::error::Error; use std::clone::Clone; use std::fmt::Error as FmtError; -use std::fmt::{Debug, Display, Formatter}; -use std::fmt; +use std::fmt::{Display, Formatter}; /// Enum of Error Types, as of now we have two: /// * ConversionError: for Errors concerning conversion failures from task_hookrs::task::Task to diff --git a/libimagtodo/src/lib.rs b/libimagtodo/src/lib.rs index a93b8143..0396704a 100644 --- a/libimagtodo/src/lib.rs +++ b/libimagtodo/src/lib.rs @@ -2,8 +2,8 @@ extern crate semver; extern crate uuid; extern crate toml; -extern crate task_hookrs; #[macro_use] extern crate libimagstore; +extern crate task_hookrs; module_entry_path_mod!("todo", "0.1.0"); diff --git a/libimagtodo/src/result.rs b/libimagtodo/src/result.rs index 2c254210..d14bf499 100644 --- a/libimagtodo/src/result.rs +++ b/libimagtodo/src/result.rs @@ -1,4 +1,4 @@ -use error::{TodoError, TodoErrorKind}; +use error::TodoError; use std::result::Result as RResult; diff --git a/libimagtodo/src/task.rs b/libimagtodo/src/task.rs index b9174a56..ba9c7e9e 100644 --- a/libimagtodo/src/task.rs +++ b/libimagtodo/src/task.rs @@ -1,4 +1,3 @@ -use std::ops::Deref; use std::collections::BTreeMap; use toml::Value; @@ -68,6 +67,7 @@ impl<'a> IntoTask<'a> for TTask { } Ok(Some(_)) => { } Err(e) => { + return Err(TodoError::new(TodoErrorKind::StoreError, Some(Box::new(e)))) } } match header.set("todo.uuid", Value::String(format!("{}",uuid))) {