Clippy: use from functions rather than as casts.

`as` is a many-faceted conversion operator, while `from` functions only do
lossless conversions.
This commit is contained in:
Dan Gohman
2019-08-13 19:17:54 -07:00
committed by Jakub Konka
parent 09ace35295
commit 39161d020f
2 changed files with 3 additions and 3 deletions

View File

@@ -197,7 +197,7 @@ pub(crate) fn poll_oneoff(
nevents,
);
if nsubscriptions as u64 > wasm32::__wasi_filesize_t::max_value() {
if u64::from(nsubscriptions) > wasm32::__wasi_filesize_t::max_value() {
return Err(Error::EINVAL);
}