mirror of https://git.sr.ht/~stygianentity/bincode
Fix for upstream rustc changes
This commit is contained in:
parent
a24d54a915
commit
883b1097ab
|
|
@ -123,7 +123,8 @@ impl<'a, R: Read> DecoderReader<'a, R> {
|
||||||
impl <'a, A> DecoderReader<'a, A> {
|
impl <'a, A> DecoderReader<'a, A> {
|
||||||
fn read_bytes<I>(&mut self, count: I) -> Result<(), DecodingError>
|
fn read_bytes<I>(&mut self, count: I) -> Result<(), DecodingError>
|
||||||
where I: NumCast {
|
where I: NumCast {
|
||||||
self.read += cast(count).unwrap();
|
let count: u64 = cast(count).unwrap();
|
||||||
|
self.read += count;
|
||||||
match self.size_limit {
|
match self.size_limit {
|
||||||
SizeLimit::Infinite => Ok(()),
|
SizeLimit::Infinite => Ok(()),
|
||||||
SizeLimit::Bounded(x) if self.read <= x => Ok(()),
|
SizeLimit::Bounded(x) if self.read <= x => Ok(()),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue