Update to bytes v0.5

Except for `multiaddr` which encapsulates its use of bytes v0.4 now.
This commit is contained in:
Toralf Wittner
2019-12-21 15:35:55 +01:00
parent 589fdafdda
commit 2bc8d9590d
25 changed files with 72 additions and 105 deletions

View File

@@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
asn1_der = "0.6.1"
bs58 = "0.3.0"
bytes = "0.4"
bytes = "0.5"
ed25519-dalek = "1.0.0-pre.3"
failure = "0.1"
fnv = "1.0"
@@ -32,7 +32,7 @@ rand = "0.7"
rw-stream-sink = { version = "0.1.1", path = "../misc/rw-stream-sink" }
sha2 = "0.8.0"
smallvec = "1.0"
unsigned-varint = "0.2"
unsigned-varint = { git = "https://github.com/twittner/unsigned-varint.git", branch = "bytes-0.5" }
void = "1"
zeroize = "1"

View File

@@ -19,7 +19,6 @@
// DEALINGS IN THE SOFTWARE.
use crate::{Transport, transport::{TransportError, ListenerEvent}};
use bytes::IntoBuf;
use fnv::FnvHashMap;
use futures::{future::{self, Ready}, prelude::*, channel::mpsc, task::Context, task::Poll};
use lazy_static::lazy_static;
@@ -271,8 +270,7 @@ impl<T> Sink<T> for Chan<T> {
}
}
impl<T: IntoBuf> Into<RwStreamSink<Chan<T>>> for Chan<T> {
#[inline]
impl<T: AsRef<[u8]>> Into<RwStreamSink<Chan<T>>> for Chan<T> {
fn into(self) -> RwStreamSink<Chan<T>> {
RwStreamSink::new(self)
}