diff --git a/.travis.yml b/.travis.yml index 75fec5a..97c967c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - 1.27.0 + - 1.30.0 - stable - beta - nightly diff --git a/Cargo.lock b/Cargo.lock index cf38d0a..b029b5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -808,6 +808,7 @@ dependencies = [ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "shannon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/audio/src/lewton_decoder.rs b/audio/src/lewton_decoder.rs index 982ed15..912d1c2 100644 --- a/audio/src/lewton_decoder.rs +++ b/audio/src/lewton_decoder.rs @@ -75,7 +75,7 @@ impl error::Error for VorbisError { error::Error::description(&self.0) } - fn cause(&self) -> Option<&error::Error> { - error::Error::cause(&self.0) + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + error::Error::source(&self.0) } } diff --git a/core/Cargo.toml b/core/Cargo.toml index e6f46e3..3469dd8 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -28,6 +28,7 @@ serde = "1.0" serde_derive = "1.0" serde_json = "1.0" shannon = "0.2.0" +tokio-codec = "0.1.1" tokio-core = "0.1.2" tokio-io = "0.1" url = "1.7.0" diff --git a/core/src/connection/handshake.rs b/core/src/connection/handshake.rs index e56bab7..f291f13 100644 --- a/core/src/connection/handshake.rs +++ b/core/src/connection/handshake.rs @@ -6,7 +6,7 @@ use protobuf::{self, Message}; use rand::thread_rng; use std::io::{self, Read}; use std::marker::PhantomData; -use tokio_io::codec::Framed; +use tokio_codec::{Decoder, Framed}; use tokio_io::io::{read_exact, write_all, ReadExact, Window, WriteAll}; use tokio_io::{AsyncRead, AsyncWrite}; @@ -72,7 +72,7 @@ impl Future for Handshake { ClientResponse(ref mut codec, ref mut write) => { let (connection, _) = try_ready!(write.poll()); let codec = codec.take().unwrap(); - let framed = connection.framed(codec); + let framed = codec.framed(connection); return Ok(Async::Ready(framed)); } } diff --git a/core/src/connection/mod.rs b/core/src/connection/mod.rs index 7e527b2..91b46c8 100644 --- a/core/src/connection/mod.rs +++ b/core/src/connection/mod.rs @@ -10,7 +10,7 @@ use std::io; use std::net::ToSocketAddrs; use tokio_core::net::TcpStream; use tokio_core::reactor::Handle; -use tokio_io::codec::Framed; +use tokio_codec::Framed; use url::Url; use authentication::Credentials; diff --git a/core/src/lib.rs b/core/src/lib.rs index 9277604..57be3b9 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -26,6 +26,7 @@ extern crate rand; extern crate serde; extern crate serde_json; extern crate shannon; +extern crate tokio_codec; extern crate tokio_core; extern crate tokio_io; extern crate url;