mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-28 18:21:20 +00:00
Update more crates to futures-0.3 (#1312)
This commit is contained in:
parent
be73b90345
commit
02c5f34fc0
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"] }
|
||||
|
||||
|
@ -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" }
|
||||
@ -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"] }
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user