diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/activate.rs | 5 | ||||
-rw-r--r-- | src/bin/deploy.rs | 11 | ||||
-rw-r--r-- | src/data.rs | 2 | ||||
-rw-r--r-- | src/deploy.rs | 4 | ||||
-rw-r--r-- | src/lib.rs | 6 | ||||
-rw-r--r-- | src/push.rs | 4 |
6 files changed, 9 insertions, 23 deletions
diff --git a/src/bin/activate.rs b/src/bin/activate.rs index 2f13b44..947e883 100644 --- a/src/bin/activate.rs +++ b/src/bin/activate.rs @@ -20,10 +20,7 @@ use notify::{RecommendedWatcher, RecursiveMode, Watcher}; use thiserror::Error; -#[macro_use] -extern crate log; - -extern crate serde_derive; +use log::{debug, error, info, warn}; /// Remote activation utility for deploy-rs #[derive(Clap, Debug)] diff --git a/src/bin/deploy.rs b/src/bin/deploy.rs index 30ebd25..8bd8b18 100644 --- a/src/bin/deploy.rs +++ b/src/bin/deploy.rs @@ -7,16 +7,11 @@ use std::io::{stdin, stdout, Write}; use clap::Clap; +use log::{debug, error, info, warn}; +use serde::Serialize; use std::process::Stdio; -use tokio::process::Command; - use thiserror::Error; - -#[macro_use] -extern crate log; - -#[macro_use] -extern crate serde_derive; +use tokio::process::Command; /// Simple Rust rewrite of a simple Nix Flake deployment tool #[derive(Clap, Debug)] diff --git a/src/data.rs b/src/data.rs index f557e41..6fe7f75 100644 --- a/src/data.rs +++ b/src/data.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MPL-2.0 use merge::Merge; - +use serde::Deserialize; use std::collections::HashMap; #[derive(Deserialize, Debug, Clone, Merge)] diff --git a/src/deploy.rs b/src/deploy.rs index a33721c..686c7b7 100644 --- a/src/deploy.rs +++ b/src/deploy.rs @@ -3,10 +3,10 @@ // // SPDX-License-Identifier: MPL-2.0 +use log::{debug, info}; use std::borrow::Cow; -use tokio::process::Command; - use thiserror::Error; +use tokio::process::Command; struct ActivateCommandData<'a> { sudo: &'a Option<String>, @@ -11,12 +11,6 @@ use thiserror::Error; use flexi_logger::*; -#[macro_use] -extern crate log; - -#[macro_use] -extern crate serde_derive; - pub fn make_lock_path(temp_path: &str, closure: &str) -> String { let lock_hash = &closure["/nix/store/".len()..closure.find('-').unwrap_or_else(|| closure.len())]; diff --git a/src/push.rs b/src/push.rs index 2f83019..0963a9a 100644 --- a/src/push.rs +++ b/src/push.rs @@ -2,11 +2,11 @@ // // SPDX-License-Identifier: MPL-2.0 +use log::{debug, info}; use std::path::Path; use std::process::Stdio; -use tokio::process::Command; - use thiserror::Error; +use tokio::process::Command; #[derive(Error, Debug)] pub enum PushProfileError { |