Skip to content

Commit cc3744b

Browse files
committed
aml: fix clippy warnings
1 parent 1505d37 commit cc3744b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aml/src/value.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl AmlValue {
494494
*/
495495
let bits_to_copy = cmp::min(length, 64);
496496
bitslice[offset..(offset + bits_to_copy)]
497-
.copy_from_bitslice(&value.to_le_bytes().view_bits()[..(bits_to_copy as usize)]);
497+
.copy_from_bitslice(&value.to_le_bytes().view_bits()[..(bits_to_copy)]);
498498
// Zero extend to the end of the buffer field
499499
bitslice[(offset + bits_to_copy)..(offset + length)].fill(false);
500500
Ok(())
@@ -514,7 +514,7 @@ impl AmlValue {
514514
let value_data = value.lock();
515515
let bits_to_copy = cmp::min(length, value_data.len() * 8);
516516
bitslice[offset..(offset + bits_to_copy)]
517-
.copy_from_bitslice(&value_data.view_bits()[..(bits_to_copy as usize)]);
517+
.copy_from_bitslice(&value_data.view_bits()[..(bits_to_copy)]);
518518
// Zero extend to the end of the buffer field
519519
bitslice[(offset + bits_to_copy)..(offset + length)].fill(false);
520520
Ok(())
@@ -560,7 +560,7 @@ impl Args {
560560
}
561561

562562
let mut args: Vec<Option<AmlValue>> = list.into_iter().map(Option::Some).collect();
563-
args.extend(core::iter::repeat(None).take(7 - args.len()));
563+
args.extend(core::iter::repeat_n(None, 7 - args.len()));
564564
Ok(Args(args.try_into().unwrap()))
565565
}
566566

0 commit comments

Comments
 (0)