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

bincode 1.0.0-alpha6 changed SizeLimit to a trait #134

Merged
merged 1 commit into from
Mar 19, 2017
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 @@ -15,7 +15,7 @@ description = "An RPC framework for Rust with a focus on ease of use."
travis-ci = { repository = "google/tarpc" }

[dependencies]
bincode = "1.0.0-alpha4"
bincode = "1.0.0-alpha6"
byteorder = "1.0"
cfg-if = "0.1.0"
futures = "0.1.7"
Expand Down
6 changes: 3 additions & 3 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// This file may not be copied, modified, or distributed except according to those terms.

use {serde, tokio_core};
use bincode::{self, SizeLimit};
use bincode::{self, Infinite};
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use std::io::{self, Cursor};
use std::marker::PhantomData;
Expand Down Expand Up @@ -47,7 +47,7 @@ impl<Encode, Decode> tokio_core::io::Codec for Codec<Encode, Decode>
buf.write_u64::<BigEndian>(bincode::serialized_size(&message)).unwrap();
bincode::serialize_into(buf,
&message,
SizeLimit::Infinite)
Infinite)
.map_err(|serialize_err| io::Error::new(io::ErrorKind::Other, serialize_err))?;
trace!("Encoded buffer: {:?}", buf);
Ok(())
Expand Down Expand Up @@ -91,7 +91,7 @@ impl<Encode, Decode> tokio_core::io::Codec for Codec<Encode, Decode>
Payload { id, len } => {
let payload = buf.drain_to(len as usize);
let result = bincode::deserialize_from(&mut Cursor::new(payload),
SizeLimit::Infinite);
Infinite);
// Reset the state machine because, either way, we're done processing this
// message.
self.state = Id;
Expand Down