diff --git a/Cargo.toml b/Cargo.toml index a132f4e..9b494d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bincode" -version = "0.0.10" +version = "0.0.11" authors = ["Ty Overby ", "Francesco Mazzoli "] repository = "https://github.com/TyOverby/bincode" @@ -11,5 +11,5 @@ license = "MIT" description = "A binary serialization / deserialization strategy and implementation." [dependencies] -rustc-serialize = "*" +rustc-serialize = "0.3.*" byteorder = "0.2.9" diff --git a/src/reader.rs b/src/reader.rs index 9402830..e6ce74c 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -79,7 +79,7 @@ fn wrap_io(err: ByteOrderError) -> DecodingError { impl Error for DecodingError { fn description(&self) -> &str { match *self { - DecodingError::IoError(ref err) => err.description(), + DecodingError::IoError(ref err) => Error::description(err), DecodingError::InvalidEncoding(ref ib) => ib.desc, DecodingError::SizeLimit => "the size limit for decoding has been reached" } @@ -385,7 +385,7 @@ fn read_at_least(reader: &mut R, min: usize, buf: &mut [u8]) -> IoResul unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec, start: usize, end: usize) -> &'a mut [T] { use std::raw::Slice; - use std::ptr::PtrExt; + //use std::ptr::PtrExt; use std::mem::transmute; assert!(start <= end); diff --git a/src/writer.rs b/src/writer.rs index de08ad7..763d3c3 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -60,7 +60,7 @@ impl fmt::Display for EncodingError { impl Error for EncodingError { fn description(&self) -> &str { match *self { - EncodingError::IoError(ref err) => err.description(), + EncodingError::IoError(ref err) => Error::description(err), EncodingError::SizeLimit => "the size limit for decoding has been reached" } }