Skip to content

Commit 873c201

Browse files
committed
Auto merge of #2268 - JohnTitor:futures, r=jtgeibel
Reduce `futures` dependencies size Use `futures-channel` and `futures-util` to reduce dependencies size. When we introduce new conduit-hyper version, we should be able to remove some deps. r? @jtgeibel
2 parents 125aff9 + 1919caa commit 873c201

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ conduit-git-http-backend = "0.8"
7777
civet = "0.9"
7878
conduit-hyper = "0.2.0"
7979

80-
futures = "0.3"
80+
futures-util = "0.3"
81+
futures-channel = { version = "0.3.1", default-features = false }
8182
tokio = { version = "0.2", default-features = false, features = ["net", "signal", "io-std"]}
8283
hyper = "0.13"
8384
ctrlc = { version = "3.0", features = ["termination"] }

src/bin/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::{
1010

1111
use civet::Server as CivetServer;
1212
use conduit_hyper::Service;
13-
use futures::prelude::*;
13+
use futures_util::future::FutureExt;
1414
use reqwest::blocking::Client;
1515

1616
enum Server {
@@ -84,7 +84,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
8484

8585
let server = server.with_graceful_shutdown(async move {
8686
// Wait for either signal
87-
futures::select! {
87+
futures_util::select! {
8888
_ = sig_int.recv().fuse() => (),
8989
_ = sig_term.recv().fuse() => (),
9090
};

src/tests/record.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{
44
borrow::Cow,
55
collections::HashSet,
66
fs::{self, File},
7+
future::Future,
78
io::{self, prelude::*},
89
path::PathBuf,
910
pin::Pin,
@@ -13,7 +14,8 @@ use std::{
1314
thread,
1415
};
1516

16-
use futures::{channel::oneshot, future, prelude::*};
17+
use futures_channel::oneshot;
18+
use futures_util::future;
1719
use hyper::{body::to_bytes, Body, Error, Request, Response, Server, StatusCode, Uri};
1820
use tokio::{
1921
net::{TcpListener, TcpStream},

0 commit comments

Comments
 (0)