Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9469f30

Browse files
committed
clippy: -D clippy::neg-multiply
1 parent 4556274 commit 9469f30

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

chips/imxrt10xx/src/dma.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ impl DmaChannel {
586586
TransferAttributes::SSIZE.val(T::DATA_TRANSFER_ID) + TransferAttributes::SMOD.val(0),
587587
);
588588
tcd.nbytes.set(mem::size_of::<T>() as u32);
589-
tcd.slast.set((-1 * (buffer.len() as i32)) as u32);
589+
tcd.slast.set((-(buffer.len() as i32)) as u32);
590590
let iterations: u16 = buffer.len() as u16;
591591
tcd.biter.set(iterations);
592592
tcd.citer.set(iterations);
@@ -604,7 +604,7 @@ impl DmaChannel {
604604
TransferAttributes::DSIZE.val(T::DATA_TRANSFER_ID) + TransferAttributes::DMOD.val(0),
605605
);
606606
tcd.nbytes.set(mem::size_of::<T>() as u32);
607-
tcd.dlast_sga.set((-1 * (buffer.len() as i32)) as u32);
607+
tcd.dlast_sga.set((-(buffer.len() as i32)) as u32);
608608
let iterations: u16 = buffer.len() as u16;
609609
tcd.biter.set(iterations);
610610
tcd.citer.set(iterations);

tools/run_clippy.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ CLIPPY_ARGS_STYLE="
106106
-A clippy::manual_range_contains
107107
-A clippy::match_like_matches_macro
108108
-A clippy::module_inception
109-
-A clippy::neg-multiply
110109
-A clippy::new-ret-no-self
111110
-A clippy::new_without_default
112111
-A clippy::redundant_closure

0 commit comments

Comments
 (0)