Use `from` instead of a possibly-future-incompatible cast
This commit is contained in:
parent
cc8c2868eb
commit
e7c57e4a02
|
@ -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",
|
||||
)),
|
||||
|
|
Loading…
Reference in New Issue