From b78c5e553ab5c83b5e6228973cb068f9bfee10e7 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 8 Oct 2019 19:37:36 +0200 Subject: Minor cleanups: Remove unused stuff --- Cargo.lock | 12 ------------ Cargo.toml | 1 - src/lib.rs | 8 +++----- src/testutils.rs | 1 - src/time.rs | 2 -- src/timezone.rs | 2 -- src/utils/fileutil.rs | 2 -- src/vcalendar.rs | 1 - 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)", @@ -854,16 +853,6 @@ name = "serde" 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" @@ -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 for DateTime { 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 { 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() { -- cgit v1.2.3