summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-10-08 19:37:36 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-10-08 19:37:36 +0200
commitb78c5e553ab5c83b5e6228973cb068f9bfee10e7 (patch)
tree7b1f94e6bace8ea4b16c1fb92ca349ea5b5eba10
parentdbf310a0643c95ae88f3af9013891fd0060a503a (diff)
Minor cleanups: Remove unused stuff
-rw-r--r--Cargo.lock12
-rw-r--r--Cargo.toml1
-rw-r--r--src/lib.rs8
-rw-r--r--src/testutils.rs1
-rw-r--r--src/time.rs2
-rw-r--r--src/timezone.rs2
-rw-r--r--src/utils/fileutil.rs2
-rw-r--r--src/vcalendar.rs1
8 files changed, 3 insertions, 26 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 7b053f2..264929b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -441,7 +441,6 @@ dependencies = [
"predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
"stderrlog 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -855,16 +854,6 @@ version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
-name = "serde_derive"
-version = "1.0.101"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "stderrlog"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1189,7 +1178,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421"
"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd"
-"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e"
"checksum stderrlog 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "61dc66b7ae72b65636dbf36326f9638fb3ba27871bb737a62e2c309b87d91b70"
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
diff --git a/Cargo.toml b/Cargo.toml
index aec8aed..37a12db 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,7 +21,6 @@ walkdir = "2.2.7"
ical = { package = "libical-sys", version = "0.1.1" }
toml = "0.5.0"
serde = "1.0.82"
-serde_derive = "1.0.82"
tempfile = "3.0.5"
uuid = { version = "0.7", features = ["v4"] }
fs2 = "0.4.3"
diff --git a/src/lib.rs b/src/lib.rs
index 8ead59a..71579d8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,21 +1,19 @@
+#![warn(unused_extern_crates)]
#![allow(clippy::redundant_closure)] // disable "redundant closure" lint
#[cfg(test)]
#[macro_use]
-extern crate maplit;
-#[cfg(test)]
-#[macro_use]
extern crate pretty_assertions;
+
#[cfg(test)]
#[macro_use]
extern crate indoc;
-extern crate serde_derive;
#[macro_use]
extern crate log;
#[macro_use]
extern crate lazy_static;
-extern crate ical;
+use ical; // extern crate
// libical does some weird, non-threadsafe things in timezone methods, notably
// icaltime_convert_to_zone (which is also called in icaltime_as_timet_with_zone)
diff --git a/src/testutils.rs b/src/testutils.rs
index 1cc3fd4..ade3ea1 100644
--- a/src/testutils.rs
+++ b/src/testutils.rs
@@ -1,7 +1,6 @@
use assert_fs::fixture::{ChildPath, FixtureError};
use assert_fs::prelude::*;
use assert_fs::TempDir;
-use std::fs;
use std::path::{Path, PathBuf};
pub fn path_to(artifact: &str) -> PathBuf {
diff --git a/src/time.rs b/src/time.rs
index 837fcc8..ce0b387 100644
--- a/src/time.rs
+++ b/src/time.rs
@@ -225,8 +225,6 @@ impl From<IcalTime> for DateTime<Utc> {
mod tests {
use super::*;
- use crate::testdata;
-
#[test]
fn test_now() {
let now = IcalTime::utc();
diff --git a/src/timezone.rs b/src/timezone.rs
index 6dc5a80..843a1ed 100644
--- a/src/timezone.rs
+++ b/src/timezone.rs
@@ -70,8 +70,6 @@ impl IcalTimeZone {
mod tests {
use super::*;
- use crate::testdata;
-
#[test]
fn test_utc() {
let tz = IcalTimeZone::utc();
diff --git a/src/utils/fileutil.rs b/src/utils/fileutil.rs
index 027e4c1..aac3ab6 100644
--- a/src/utils/fileutil.rs
+++ b/src/utils/fileutil.rs
@@ -4,8 +4,6 @@ use std::io::{BufRead, BufReader};
use std::path::{Path, PathBuf};
use std::{fs, io};
-use crate::IcalVCalendar;
-
pub fn file_iter(dir: &Path) -> impl Iterator<Item = PathBuf> {
use walkdir::WalkDir;
diff --git a/src/vcalendar.rs b/src/vcalendar.rs
index 03a1ab3..09752d5 100644
--- a/src/vcalendar.rs
+++ b/src/vcalendar.rs
@@ -407,7 +407,6 @@ impl Drop for IcalComponentOwner {
mod tests {
use super::*;
use crate::testdata;
- use chrono::{Local, TimeZone};
#[test]
fn test_from_str_empty() {