diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-05-09 17:13:16 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-05-09 17:28:43 -0300 |
| commit | 4f989aa3009ff3732e09f312f1125b2e3c800024 (patch) | |
| tree | 8039f32d61aace4b512743af717f5e4550eead29 | |
| parent | 6f1c402f79a92a1ff875a2a2507841c19f571430 (diff) | |
| download | mullvadvpn-4f989aa3009ff3732e09f312f1125b2e3c800024.tar.xz mullvadvpn-4f989aa3009ff3732e09f312f1125b2e3c800024.zip | |
Remove usage of `lazy_static` in `talpid-core`
Not necessary anymore, because `Duration` can be constructed as a
constant now.
| -rw-r--r-- | Cargo.lock | 1 | ||||
| -rw-r--r-- | talpid-core/Cargo.toml | 1 | ||||
| -rw-r--r-- | talpid-core/src/lib.rs | 2 | ||||
| -rw-r--r-- | talpid-core/src/tunnel/openvpn.rs | 6 |
4 files changed, 2 insertions, 8 deletions
diff --git a/Cargo.lock b/Cargo.lock index b467d6b1e9..1a7c361918 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1359,7 +1359,6 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc?tag=v8.0.1)", "jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc?tag=v8.0.1)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/talpid-core/Cargo.toml b/talpid-core/Cargo.toml index c9e4da653c..864368e31f 100644 --- a/talpid-core/Cargo.toml +++ b/talpid-core/Cargo.toml @@ -11,7 +11,6 @@ duct = "0.10" error-chain = "0.11" jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc", tag = "v8.0.1" } jsonrpc-macros = { git = "https://github.com/paritytech/jsonrpc", tag = "v8.0.1" } -lazy_static = "1.0" libc = "0.2.20" log = "0.4" uuid = { version = "0.6", features = ["v4"] } diff --git a/talpid-core/src/lib.rs b/talpid-core/src/lib.rs index 6c6e907255..c2939cc762 100644 --- a/talpid-core/src/lib.rs +++ b/talpid-core/src/lib.rs @@ -14,8 +14,6 @@ extern crate atty; extern crate duct; #[macro_use] -extern crate lazy_static; -#[macro_use] extern crate log; #[macro_use] diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs index 90837530cd..a3d72814eb 100644 --- a/talpid-core/src/tunnel/openvpn.rs +++ b/talpid-core/src/tunnel/openvpn.rs @@ -32,9 +32,7 @@ pub use self::errors::*; #[cfg(unix)] -lazy_static! { - static ref OPENVPN_DIE_TIMEOUT: Duration = Duration::from_secs(2); -} +static OPENVPN_DIE_TIMEOUT: Duration = Duration::from_secs(2); /// Struct for monitoring an OpenVPN process. @@ -214,7 +212,7 @@ impl ProcessHandle for duct::Handle { #[cfg(unix)] fn kill(&self) -> io::Result<()> { use process::unix::HandleKillExt; - self.nice_kill(*OPENVPN_DIE_TIMEOUT) + self.nice_kill(OPENVPN_DIE_TIMEOUT) } #[cfg(not(unix))] |
