summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-12-18 11:51:43 +0100
committerMatthias Beyer <mail@beyermatthias.de>2022-12-18 12:07:01 +0100
commit77224b3896fd85d57f623113bacda31b9b08e699 (patch)
tree0810f51c6487ae6815063912e516ccc6a1ac9220
parentdfb53dd0b1b2d887ad6d1f9de198eeb1fdc13390 (diff)
Remove "extern crate" declarations
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/error.rs2
-rw-r--r--src/lib.rs15
-rw-r--r--src/task.rs6
3 files changed, 4 insertions, 19 deletions
diff --git a/src/error.rs b/src/error.rs
index af4dfd5..6469c26 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -7,7 +7,7 @@
//! Definitions for error handling with failure
/// Failure error kind type, defining error messages
-#[derive(Debug, Clone, Eq, PartialEq, Fail)]
+#[derive(Debug, Clone, Eq, PartialEq, failure::Fail)]
pub enum ErrorKind {
/// Error kind indicating that the JSON parser failed
#[fail(display = "Failed to create a Task from JSON")]
diff --git a/src/lib.rs b/src/lib.rs
index 3bca993..3f9ae99 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -43,21 +43,6 @@
while_true
)]
-extern crate chrono;
-extern crate serde;
-#[macro_use]
-extern crate serde_json;
-extern crate uuid;
-#[macro_use]
-extern crate derive_builder;
-#[macro_use]
-extern crate failure;
-
-#[cfg(test)]
-extern crate env_logger;
-#[macro_use]
-extern crate log;
-
pub mod annotation;
pub mod date;
pub mod error;
diff --git a/src/task.rs b/src/task.rs
index d44852c..8cf65d7 100644
--- a/src/task.rs
+++ b/src/task.rs
@@ -41,7 +41,7 @@ use crate::urgency::Urgency;
///
/// It is deserializeable and serializeable via serde_json, so importing and exporting taskwarrior
/// tasks is simply serializing and deserializing objects of this type.
-#[derive(Debug, Clone, PartialEq, Builder)]
+#[derive(Debug, Clone, PartialEq, derive_builder::Builder)]
#[builder(setter(into))]
pub struct Task {
/// The temporary assigned task id
@@ -774,7 +774,7 @@ impl<'de> Visitor<'de> for TaskDeserializeVisitor {
}
field => {
- debug!("Inserting '{}' as UDA", field);
+ log::debug!("Inserting '{}' as UDA", field);
let uda_value: UDAValue = visitor.next_value()?;
uda.insert(UDAName::from(field), uda_value);
}
@@ -831,7 +831,7 @@ mod test {
fn mklogger() {
let _ = env_logger::init();
- debug!("Env-logger enabled");
+ log::debug!("Env-logger enabled");
}
fn mkdate(s: &str) -> Date {