mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
drm/panic: clean Clippy warning
Clippy warns:
error: manual implementation of an assign operation
--> drivers/gpu/drm/drm_panic_qr.rs:418:25
|
418 | self.carry = self.carry % pow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.carry %= pow`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
Thus clean it up.
Fixes: dbed4a797e ("drm/panic: Better binary encoding in QR code")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250303093242.1011790-1-ojeda@kernel.org
This commit is contained in:
parent
12ec4f30fc
commit
57145afa33
|
|
@ -415,7 +415,7 @@ fn next(&mut self) -> Option<Self::Item> {
|
|||
self.carry_len -= out_len;
|
||||
let pow = u64::pow(10, self.carry_len as u32);
|
||||
let out = (self.carry / pow) as u16;
|
||||
self.carry = self.carry % pow;
|
||||
self.carry %= pow;
|
||||
Some((out, NUM_CHARS_BITS[out_len]))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user