Skip to content

Commit a417f37

Browse files
committed
lift cast to loop condition
1 parent 09e92c7 commit a417f37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libbz2-rs-sys/src/decompress.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,9 @@ pub(crate) fn decompress(
10151015
let bytes_needed = bits_needed.div_ceil(8);
10161016

10171017
if strm.avail_in as usize >= bytes_needed {
1018-
for t in 0..nGroups {
1018+
for t in 0..usize::from(nGroups) {
10191019
let mut curr = GET_BITS!(strm, s, 5);
1020-
for i in 0..alphaSize {
1020+
for i in 0..usize::from(alphaSize) {
10211021
loop {
10221022
if !(1..=20).contains(&curr) {
10231023
error!(BZ_DATA_ERROR);
@@ -1031,7 +1031,7 @@ pub(crate) fn decompress(
10311031
}
10321032
}
10331033

1034-
s.len[usize::from(t)][usize::from(i)] = curr as u8;
1034+
s.len[t][i] = curr as u8;
10351035
}
10361036
}
10371037

0 commit comments

Comments
 (0)