chore(deps): bump bincode from 1.2.1 to 1.3.1 (#10867)

* chore(deps): bump bincode from 1.2.1 to 1.3.1

Bumps [bincode](https://github.com/servo/bincode) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* [auto-commit] Update all Cargo lock files

* Switch from deprecated method

* Add options to maintain behavior with bincode::options()

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
dependabot-preview[bot]
2020-07-09 00:08:05 +00:00
committed by GitHub
parent 1a6bbd2867
commit 841ecfd927
35 changed files with 95 additions and 73 deletions

View File

@ -9,7 +9,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
bincode = "1.2.1"
bincode = "1.3.1"
byteorder = "1.3.4"
chrono = { version = "0.4.11", features = ["serde"] }
crossbeam-channel = "0.4"

View File

@ -3,6 +3,7 @@ use crate::{
entry::{create_ticks, Entry},
erasure::Session,
};
use bincode::config::Options;
use core::cell::RefCell;
use rayon::{
iter::{IndexedParallelIterator, IntoParallelRefMutIterator, ParallelIterator},
@ -137,8 +138,10 @@ impl Shred {
where
T: Deserialize<'de>,
{
let ret = bincode::config()
.limit(PACKET_DATA_SIZE as u64)
let ret = bincode::options()
.with_limit(PACKET_DATA_SIZE as u64)
.with_fixint_encoding()
.allow_trailing_bytes()
.deserialize(&buf[*index..*index + size])?;
*index += size;
Ok(ret)