Use `from` instead of a possibly-future-incompatible cast

This commit is contained in:
Kris Nuttycombe 2021-12-07 09:25:50 -07:00
parent cc8c2868eb
commit e7c57e4a02
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ impl CompactSize {
}?;
match result {
s if s > (MAX_COMPACT_SIZE as u64) => Err(io::Error::new(
s if s > <u64>::from(MAX_COMPACT_SIZE) => Err(io::Error::new(
io::ErrorKind::InvalidInput,
"CompactSize too large",
)),