diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-02-21 15:39:44 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-02-24 12:45:04 +0000 |
| commit | 44adad73b1875cc15d14c02f48dc29dc57710ca5 (patch) | |
| tree | 0bf3b912dcef3b4088fe2ff694d598f91e29425a | |
| parent | acb8edde85a7911132d4ba3d058da20ef61c9347 (diff) | |
| download | mullvadvpn-44adad73b1875cc15d14c02f48dc29dc57710ca5.tar.xz mullvadvpn-44adad73b1875cc15d14c02f48dc29dc57710ca5.zip | |
Move `BoxFuture` to crate root module
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 9 | ||||
| -rw-r--r-- | mullvad-daemon/src/management_interface.rs | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index f7a12ae6bc..fb2ba66360 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -15,9 +15,7 @@ pub mod version; mod version_check; pub use crate::management_interface::ManagementCommand; -use crate::management_interface::{ - BoxFuture, ManagementInterfaceEventBroadcaster, ManagementInterfaceServer, -}; +use crate::management_interface::{ManagementInterfaceEventBroadcaster, ManagementInterfaceServer}; use futures::{ future::{self, Executor}, stream::Wait, @@ -67,6 +65,11 @@ use talpid_types::{ #[path = "wireguard.rs"] mod wireguard; +/// FIXME(linus): This is here just because the futures crate has deprecated it and jsonrpc_core +/// did not introduce their own yet (https://github.com/paritytech/jsonrpc/pull/196). +/// Remove this and use the one in jsonrpc_core when that is released. +type BoxFuture<T, E> = Box<dyn Future<Item = T, Error = E> + Send>; + #[derive(err_derive::Error, Debug)] #[error(no_from)] pub enum Error { diff --git a/mullvad-daemon/src/management_interface.rs b/mullvad-daemon/src/management_interface.rs index 3bc2196f44..8da075f539 100644 --- a/mullvad-daemon/src/management_interface.rs +++ b/mullvad-daemon/src/management_interface.rs @@ -1,4 +1,4 @@ -use crate::EventListener; +use crate::{BoxFuture, EventListener}; use jsonrpc_core::{ futures::{ future, @@ -31,11 +31,6 @@ use talpid_ipc; use talpid_types::ErrorExt; use uuid; -/// FIXME(linus): This is here just because the futures crate has deprecated it and jsonrpc_core -/// did not introduce their own yet (https://github.com/paritytech/jsonrpc/pull/196). -/// Remove this and use the one in jsonrpc_core when that is released. -pub type BoxFuture<T, E> = Box<dyn Future<Item = T, Error = E> + Send>; - build_rpc_trait! { pub trait ManagementInterfaceApi { type Metadata; |
