Skip to content

Commit d53b695

Browse files
tekknolagiXrXr
andauthored
use usize::from
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
1 parent 7e77d8e commit d53b695

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

zjit/src/distribution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<T: Copy + PartialEq + Default + std::fmt::Debug, const N: usize> Distributi
8787
assert!(first_count >= count, "First count should be the largest");
8888
}
8989
}
90-
let num_seen = dist.counts.iter().map(|&c| c as usize).sum::<usize>() + dist.other as usize;
90+
let num_seen = dist.counts.iter().map(|&c| usize::from(c)).sum() + usize::from(dist.other);
9191
let kind = if dist.other == 0 {
9292
// Seen <= N types total
9393
if dist.counts[0] == 0 {

0 commit comments

Comments
 (0)