Fix for upstream rustc changes

This commit is contained in:
Mike Dilger 2015-04-01 08:41:50 +13:00
parent a24d54a915
commit 883b1097ab
1 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,8 @@ impl<'a, R: Read> DecoderReader<'a, R> {
impl <'a, A> DecoderReader<'a, A> {
fn read_bytes<I>(&mut self, count: I) -> Result<(), DecodingError>
where I: NumCast {
self.read += cast(count).unwrap();
let count: u64 = cast(count).unwrap();
self.read += count;
match self.size_limit {
SizeLimit::Infinite => Ok(()),
SizeLimit::Bounded(x) if self.read <= x => Ok(()),