summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-09-01 15:41:40 +0200
committerLinus Färnstrand <linus@mullvad.net>2017-09-01 15:41:40 +0200
commitabf6ff9277e8703e22e27cb11acb32aae4697e2a (patch)
tree705b052e4899be657c21ad7133d0d351e73a030f
parentdb19f0c33aa3f9ec2b04e22bc54edd274aed4cd3 (diff)
downloadmullvadvpn-abf6ff9277e8703e22e27cb11acb32aae4697e2a.tar.xz
mullvadvpn-abf6ff9277e8703e22e27cb11acb32aae4697e2a.zip
Declare local (temporary) BoxFuture
-rw-r--r--mullvad-daemon/src/main.rs4
-rw-r--r--mullvad-daemon/src/management_interface.rs6
2 files changed, 7 insertions, 3 deletions
diff --git a/mullvad-daemon/src/main.rs b/mullvad-daemon/src/main.rs
index deb3d184f2..04797ea8a1 100644
--- a/mullvad-daemon/src/main.rs
+++ b/mullvad-daemon/src/main.rs
@@ -36,10 +36,10 @@ mod settings;
mod shutdown;
use error_chain::ChainedError;
-use futures::{BoxFuture, Future};
+use futures::Future;
use jsonrpc_client_http::HttpHandle;
use jsonrpc_core::futures::sync::oneshot::Sender as OneshotSender;
-use management_interface::{ManagementInterfaceServer, TunnelCommand};
+use management_interface::{BoxFuture, ManagementInterfaceServer, TunnelCommand};
use master::AccountsProxy;
use mullvad_types::account::{AccountData, AccountToken};
use mullvad_types::states::{DaemonState, SecurityState, TargetState};
diff --git a/mullvad-daemon/src/management_interface.rs b/mullvad-daemon/src/management_interface.rs
index 47a2c81d33..ab1c4deee9 100644
--- a/mullvad-daemon/src/management_interface.rs
+++ b/mullvad-daemon/src/management_interface.rs
@@ -2,7 +2,7 @@ use error_chain;
use jsonrpc_client_core;
use jsonrpc_core::{Error, ErrorCode, Metadata};
-use jsonrpc_core::futures::{BoxFuture, Future, future, sync};
+use jsonrpc_core::futures::{Future, future, sync};
use jsonrpc_core::futures::sync::oneshot::Sender as OneshotSender;
use jsonrpc_macros::pubsub;
use jsonrpc_pubsub::{PubSubHandler, PubSubMetadata, Session, SubscriptionId};
@@ -22,6 +22,10 @@ use talpid_core::mpsc::IntoSender;
use talpid_ipc;
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<Future<Item = T, Error = E> + Send>;
build_rpc_trait! {
pub trait ManagementInterfaceApi {