diff --git a/Cargo.lock b/Cargo.lock index 1b1d93a..6bd1390 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,7 +143,6 @@ dependencies = [ "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "stderrlog 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "subprocess 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -298,6 +297,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 35a5ce0..6bdb575 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,15 +2,15 @@ name = "isp-uptime" version = "0.1.0" authors = ["Anders Olsson "] +edition = "2018" [dependencies] chrono = "0.4" -handlebars = { version = "1.0", features = ["no_dir_source"], default-features = false} -humantime = "1.1" +handlebars = { version = "1.1", features = ["no_dir_source"], default-features = false} +humantime = "1.2" log = "0.4" stderrlog = "0.4" -serde = "1.0" -serde_derive = "1.0" +serde = { version = "1.0", features = ["derive"] } structopt = "0.2" subprocess = "0.1" toml = "0.5" diff --git a/src/lib.rs b/src/lib.rs index c154b82..2622dff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,17 +1,8 @@ -extern crate chrono; -extern crate handlebars; -extern crate humantime; -#[macro_use] -extern crate log; -extern crate stderrlog; -#[macro_use] -extern crate serde_derive; -extern crate subprocess; -extern crate toml; - use std::collections::HashMap; use log::Level::Debug; +use log::{debug, info, log_enabled}; +use serde::Deserialize; use subprocess::Exec; #[derive(Debug, Deserialize)] diff --git a/src/main.rs b/src/main.rs index 4906f77..be25eca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,17 +1,3 @@ -extern crate chrono; -extern crate handlebars; -extern crate humantime; -#[macro_use] -extern crate log; -extern crate stderrlog; -#[macro_use] -extern crate serde_derive; -#[macro_use] -extern crate structopt; -extern crate isp_uptime; -extern crate subprocess; -extern crate toml; - use std::fs; use std::io::{self, Read, Write}; use std::path::PathBuf;