diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-10-29 16:34:23 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-10-29 16:34:23 +0100 |
| commit | 7e4eb3711be85e084dfbf65d090b94f482f084c1 (patch) | |
| tree | 52a27abeb3f967a44d577bd621fdf3ab4aab2ca6 | |
| parent | da2c819a0338f652889f17bb6e3f7924d0eb956c (diff) | |
| download | mullvadvpn-7e4eb3711be85e084dfbf65d090b94f482f084c1.tar.xz mullvadvpn-7e4eb3711be85e084dfbf65d090b94f482f084c1.zip | |
Remove #[macro_use] from jsonrpc_macros and jsonrpc_client_core
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 3 | ||||
| -rw-r--r-- | mullvad-daemon/src/management_interface.rs | 5 | ||||
| -rw-r--r-- | mullvad-rpc/src/lib.rs | 2 | ||||
| -rw-r--r-- | talpid-core/src/lib.rs | 1 | ||||
| -rw-r--r-- | talpid-core/src/tunnel/openvpn.rs | 1 | ||||
| -rw-r--r-- | talpid-ipc/tests/ipc-client-server.rs | 2 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/src/lib.rs | 3 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/src/processing.rs | 17 |
8 files changed, 14 insertions, 20 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index ee6dae4aba..13ae19e7a7 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -19,9 +19,8 @@ extern crate serde; extern crate serde_json; extern crate jsonrpc_core; -#[macro_use] -extern crate jsonrpc_macros; extern crate jsonrpc_ipc_server; +extern crate jsonrpc_macros; extern crate jsonrpc_pubsub; extern crate rand; extern crate tokio_core; diff --git a/mullvad-daemon/src/management_interface.rs b/mullvad-daemon/src/management_interface.rs index 302dafb2ae..07fd603e2a 100644 --- a/mullvad-daemon/src/management_interface.rs +++ b/mullvad-daemon/src/management_interface.rs @@ -3,13 +3,12 @@ use jsonrpc_core::futures::sync::oneshot::Sender as OneshotSender; use jsonrpc_core::futures::{future, sync, Future}; use jsonrpc_core::{Error, ErrorCode, MetaIoHandler, Metadata}; use jsonrpc_ipc_server; -use jsonrpc_macros::pubsub; +use jsonrpc_macros::{build_rpc_trait, metadata, pubsub}; use jsonrpc_pubsub::{PubSubHandler, PubSubMetadata, Session, SubscriptionId}; +use mullvad_paths; use mullvad_rpc; use mullvad_types::account::{AccountData, AccountToken}; use mullvad_types::location::GeoIpLocation; - -use mullvad_paths; use mullvad_types::relay_constraints::RelaySettingsUpdate; use mullvad_types::relay_list::RelayList; use mullvad_types::settings::Settings; diff --git a/mullvad-rpc/src/lib.rs b/mullvad-rpc/src/lib.rs index 047d6b85e6..4ffd3510a7 100644 --- a/mullvad-rpc/src/lib.rs +++ b/mullvad-rpc/src/lib.rs @@ -12,7 +12,6 @@ extern crate error_chain; extern crate futures; extern crate hyper; extern crate hyper_openssl; -#[macro_use] extern crate jsonrpc_client_core; extern crate jsonrpc_client_http; extern crate lazy_static; @@ -24,6 +23,7 @@ extern crate mullvad_types; use chrono::offset::Utc; use chrono::DateTime; +use jsonrpc_client_core::{expand_params, jsonrpc_client}; use jsonrpc_client_http::header::Host; use jsonrpc_client_http::{HttpTransport, HttpTransportBuilder}; use lazy_static::lazy_static; diff --git a/talpid-core/src/lib.rs b/talpid-core/src/lib.rs index 9747b2fa92..f2bfb7718f 100644 --- a/talpid-core/src/lib.rs +++ b/talpid-core/src/lib.rs @@ -22,7 +22,6 @@ extern crate futures; #[cfg(unix)] extern crate ipnetwork; extern crate jsonrpc_core; -#[macro_use] extern crate jsonrpc_macros; #[cfg(unix)] extern crate lazy_static; diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs index 5999dc781d..ea2d2d5823 100644 --- a/talpid-core/src/tunnel/openvpn.rs +++ b/talpid-core/src/tunnel/openvpn.rs @@ -214,6 +214,7 @@ impl ProcessHandle for OpenVpnProcHandle { mod event_server { use super::OpenVpnPluginEvent; use jsonrpc_core::{Error, IoHandler, MetaIoHandler}; + use jsonrpc_macros::build_rpc_trait; use std::collections::HashMap; use talpid_ipc; use uuid; diff --git a/talpid-ipc/tests/ipc-client-server.rs b/talpid-ipc/tests/ipc-client-server.rs index a0efdc4f9c..9d2aebd19f 100644 --- a/talpid-ipc/tests/ipc-client-server.rs +++ b/talpid-ipc/tests/ipc-client-server.rs @@ -3,7 +3,6 @@ extern crate env_logger; extern crate jsonrpc_client_core; extern crate jsonrpc_client_ipc; extern crate jsonrpc_core; -#[macro_use] extern crate jsonrpc_macros; extern crate talpid_ipc; extern crate tokio; @@ -17,6 +16,7 @@ use futures::Future; use jsonrpc_client_core::{Error as ClientError, Transport}; use jsonrpc_core::{Error, IoHandler}; +use jsonrpc_macros::build_rpc_trait; use std::sync::{mpsc, Mutex}; use std::time::Duration; diff --git a/talpid-openvpn-plugin/src/lib.rs b/talpid-openvpn-plugin/src/lib.rs index 11e87c7839..db0e3bf41c 100644 --- a/talpid-openvpn-plugin/src/lib.rs +++ b/talpid-openvpn-plugin/src/lib.rs @@ -11,9 +11,8 @@ extern crate env_logger; extern crate error_chain; extern crate log; -#[macro_use] -extern crate jsonrpc_client_core; extern crate futures; +extern crate jsonrpc_client_core; extern crate jsonrpc_client_ipc; extern crate openvpn_plugin; extern crate tokio; diff --git a/talpid-openvpn-plugin/src/processing.rs b/talpid-openvpn-plugin/src/processing.rs index ae2cbb7526..5ac6bed8d3 100644 --- a/talpid-openvpn-plugin/src/processing.rs +++ b/talpid-openvpn-plugin/src/processing.rs @@ -1,16 +1,13 @@ -use openvpn_plugin; -use std::collections::HashMap; - extern crate futures; -use jsonrpc_client_core::{Future, Result as ClientResult, Transport}; -use jsonrpc_client_ipc::IpcTransport; - -use tokio::reactor::Handle; -use tokio::runtime::Runtime; - use super::Arguments; -use std::thread; +use jsonrpc_client_core::{ + expand_params, jsonrpc_client, Future, Result as ClientResult, Transport, +}; +use jsonrpc_client_ipc::IpcTransport; +use openvpn_plugin; +use std::{collections::HashMap, thread}; +use tokio::{reactor::Handle, runtime::Runtime}; error_chain! { errors { |
