summaryrefslogtreecommitdiffhomepage
path: root/mullvad-rpc/src/rest.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mullvad-rpc/src/rest.rs')
-rw-r--r--mullvad-rpc/src/rest.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/mullvad-rpc/src/rest.rs b/mullvad-rpc/src/rest.rs
index 0e8994b1c3..025c22eaa8 100644
--- a/mullvad-rpc/src/rest.rs
+++ b/mullvad-rpc/src/rest.rs
@@ -5,7 +5,6 @@ use futures::{
stream::StreamExt,
TryFutureExt,
};
-use futures01::Future as OldFuture;
use hyper::{
client::{connect::Connect, Client},
header::{self, HeaderValue},
@@ -194,22 +193,6 @@ impl RequestServiceHandle {
completion_rx.await.map_err(|_| Error::ReceiveError)?
}
- /// Spawns a future on the hyper runtime returning an old-style future that can be spawned on
- /// any runtime
- pub fn compat_spawn<T: Send + std::fmt::Debug + 'static>(
- &self,
- future: impl Future<Output = Result<T>> + Send + 'static,
- ) -> impl futures01::Future<Item = T, Error = Error> {
- let (tx, rx) = futures01::sync::oneshot::channel();
- let _ = self.handle.spawn(async move {
- let result = future.await;
- let _ = tx.send(result);
- });
-
-
- rx.map_err(|_| Error::ReceiveError).flatten()
- }
-
/// Spawns a future on the RPC runtime.
pub fn spawn<T: Send + 'static>(&self, future: impl Future<Output = T> + Send + 'static) {
let _ = self.handle.spawn(future);