Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update more crates to futures-0.3 #1312

Merged
merged 1 commit into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ libp2p-uds = { version = "0.13.0", path = "transports/uds" }
libp2p-wasm-ext = { version = "0.6.0", path = "transports/wasm-ext" }
libp2p-yamux = { version = "0.13.0", path = "muxers/yamux" }
parking_lot = "0.9.0"
smallvec = "0.6"
smallvec = "1.0"
tokio-codec = "0.1"
tokio-executor = "0.1"
tokio-io = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ quick-error = "1.2"
rand = "0.7"
rw-stream-sink = { version = "0.1.1", path = "../misc/rw-stream-sink" }
sha2 = "0.8.0"
smallvec = "0.6"
smallvec = "1.0"
unsigned-varint = "0.2"
void = "1"
wasm-timer = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions core/src/nodes/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ where
/// Destroys all outbound streams and returns the corresponding user data.
pub fn cancel_outgoing(&mut self) -> Vec<TUserData> {
let mut out = Vec::with_capacity(self.outbound_substreams.len());
for (user_data, outbound) in self.outbound_substreams.drain() {
for (user_data, outbound) in self.outbound_substreams.drain(..) {
out.push(user_data);
self.muxer.destroy_outbound(outbound);
}
Expand Down Expand Up @@ -201,7 +201,7 @@ where
// The substreams that were produced will continue to work, as the muxer is held in an Arc.
// However we will no longer process any further inbound or outbound substream, and we
// therefore close everything.
for (_, outbound) in self.outbound_substreams.drain() {
for (_, outbound) in self.outbound_substreams.drain(..) {
self.muxer.destroy_outbound(outbound);
}
}
Expand Down
2 changes: 1 addition & 1 deletion misc/multistream-select/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2018"
bytes = "0.4"
futures = "0.1"
log = "0.4"
smallvec = "0.6"
smallvec = "1.0"
tokio-io = "0.1"
unsigned-varint = "0.2.2"

Expand Down
6 changes: 3 additions & 3 deletions protocols/deflate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
futures-preview = "0.3.0-alpha.18"
futures = "0.3.1"
libp2p-core = { version = "0.13.0", path = "../../core" }
flate2 = "1.0"

[dev-dependencies]
async-std = "0.99"
async-std = "1.0"
env_logger = "0.7.1"
libp2p-tcp = { version = "0.13.0", path = "../../transports/tcp" }
rand = "0.7"
quickcheck = "0.9.0"
quickcheck = "0.9"
4 changes: 2 additions & 2 deletions protocols/floodsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ bs58 = "0.3.0"
bytes = "0.4"
cuckoofilter = "0.3.2"
fnv = "1.0"
futures-preview = "0.3.0-alpha.18"
futures = "0.3.1"
libp2p-core = { version = "0.13.0", path = "../../core" }
libp2p-swarm = { version = "0.3.0", path = "../../swarm" }
protobuf = "2.8"
rand = "0.6"
smallvec = "0.6.5"
smallvec = "1.0"
6 changes: 3 additions & 3 deletions protocols/identify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ categories = ["network-programming", "asynchronous"]

[dependencies]
bytes = "0.4"
futures_codec = "0.3.0"
futures-preview = "0.3.0-alpha.18"
futures_codec = "0.3.1"
futures = "0.3.1"
libp2p-core = { version = "0.13.0", path = "../../core" }
libp2p-swarm = { version = "0.3.0", path = "../../swarm" }
log = "0.4.1"
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../../misc/multiaddr" }
protobuf = "2.8"
smallvec = "0.6"
smallvec = "1.0"
wasm-timer = "0.2"
unsigned-varint = { version = "0.2.3", features = ["futures-codec"] }

Expand Down
6 changes: 3 additions & 3 deletions protocols/kad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ arrayvec = "0.5.1"
bytes = "0.4"
either = "1.5"
fnv = "1.0"
futures_codec = "0.3.0"
futures-preview = "0.3.0-alpha.18"
futures_codec = "0.3.1"
futures = "0.3.1"
log = "0.4"
libp2p-core = { version = "0.13.0", path = "../../core" }
libp2p-swarm = { version = "0.3.0", path = "../../swarm" }
Expand All @@ -24,7 +24,7 @@ multihash = { package = "parity-multihash", version = "0.1.4", path = "../../mis
protobuf = "2.8"
rand = "0.7.2"
sha2 = "0.8.0"
smallvec = "0.6"
smallvec = "1.0"
wasm-timer = "0.2"
uint = "0.8"
unsigned-varint = { version = "0.2.3", features = ["futures-codec"] }
Expand Down
2 changes: 1 addition & 1 deletion protocols/noise/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2018"
[dependencies]
bytes = "0.4"
curve25519-dalek = "1"
futures-preview = "0.3.0-alpha.18"
futures = "0.3.1"
lazy_static = "1.2"
libp2p-core = { version = "0.13.0", path = "../../core" }
log = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions protocols/noise/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

pub mod handshake;

use futures::{ready, Poll};
use futures::ready;
use futures::prelude::*;
use log::{debug, trace};
use snow;
use std::{fmt, io, pin::Pin, ops::DerefMut, task::Context};
use std::{fmt, io, pin::Pin, ops::DerefMut, task::{Context, Poll}};

const MAX_NOISE_PKG_LEN: usize = 65535;
const MAX_WRITE_BUF_LEN: usize = 16384;
Expand Down
2 changes: 1 addition & 1 deletion protocols/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ libp2p-core = { version = "0.13.0", path = "../../core" }
libp2p-swarm = { version = "0.3.0", path = "../../swarm" }
log = "0.4.1"
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../../misc/multiaddr" }
futures-preview = "0.3.0-alpha.18"
futures = "0.3.1"
rand = "0.7.2"
wasm-timer = "0.2"
void = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
futures = "0.3.1"
libp2p-core = { version = "0.13.0", path = "../core" }
smallvec = "0.6"
smallvec = "1.0"
wasm-timer = "0.2"
void = "1"

Expand Down
2 changes: 1 addition & 1 deletion transports/dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
libp2p-core = { version = "0.13.0", path = "../../core" }
log = "0.4.1"
futures-preview = "0.3.0-alpha.18"
futures = "0.3.1"
4 changes: 2 additions & 2 deletions transports/wasm-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
futures-preview = "0.3.0-alpha.18"
futures = "0.3.1"
js-sys = "0.3.19"
libp2p-core = { version = "0.13.0", path = "../../core" }
parity-send-wrapper = "0.1.0"
wasm-bindgen = "0.2.42"
wasm-bindgen-futures = { version = "0.3.25", features = ["futures_0_3"] }
wasm-bindgen-futures = "0.4.4"
2 changes: 1 addition & 1 deletion transports/wasm-ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use libp2p_core::{transport::ListenerEvent, transport::TransportError, Multiaddr
use parity_send_wrapper::SendWrapper;
use std::{collections::VecDeque, error, fmt, io, mem, pin::Pin, task::Context, task::Poll};
use wasm_bindgen::{JsCast, prelude::*};
use wasm_bindgen_futures::futures_0_3::JsFuture;
use wasm_bindgen_futures::JsFuture;

/// Contains the definition that one must match on the JavaScript side.
pub mod ffi {
Expand Down