drm/panic: clean Clippy warning
Subsystems (3)
Miguel Ojeda
maintainerPATCH 1/1 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_patternThus clean it up.
Fixes dbed4a797e00 ("drm/panic: Better binary encoding in QR code")
Signed-off-by Miguel Ojeda <[email protected]>
--- drivers/gpu/drm/drm_panic_qr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_panic_qr.rs +1 -1
@@ -415,7 +415,7 @@ fn next(&mut self) -> Option<Self::Item> { self.carry_len -= out_len;let pow = u64::pow (10 , self.carry_lenas u32 );let out = (self.carry / pow)as u16 ; - self.carry = self.carry % pow; + self.carry %= pow;Some ((out,NUM_CHARS_BITS [out_len])) } }
base-commit: c0eb65494e59d9834af7cbad983629e9017b25a1
Signature · 1 line
2.48.1
Quoted 11 lines · Miguel Ojeda
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
Quoted 4 lines
Thus clean it up.
Fixes dbed4a797e00 ("drm/panic: Better binary encoding in QR code")Signed-off-by Miguel Ojeda <[email protected]>
Reviewed-by Alice Ryhl <[email protected]>
Quoted 11 lines · Miguel Ojeda
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_patternThus clean it up.
Thanks, it looks good to me.
Reviewed-by Jocelyn Falempe <[email protected]>
Quoted 22 lines
Fixes dbed4a797e00 ("drm/panic: Better binary encoding in QR code")Signed-off-by Miguel Ojeda <[email protected]>--- drivers/gpu/drm/drm_panic_qr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_panic_qr.rs +1
-1@@ -415,7 +415,7 @@ fn next(&mut self) -> Option<Self::Item> { self.carry_len -= out_len;let pow = u64::pow (10 , self.carry_lenas u32 );let out = (self.carry / pow)as u16 ; - self.carry = self.carry % pow; + self.carry %= pow;Some ((out,NUM_CHARS_BITS [out_len])) } }base-commit:
c0eb65494e59d9834af7cbad983629e9017b25a1
Jocelyn Falempe
AppliedQuoted 11 lines · Miguel Ojeda
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_patternThus clean it up.
Applied to drm-misc-next (because dbed4a797e00 is only present in this branch).
Thanks for your contribution.
Signature · 1 line
Jocelyn
Quoted 22 lines
Fixes dbed4a797e00 ("drm/panic: Better binary encoding in QR code")Signed-off-by Miguel Ojeda <[email protected]>--- drivers/gpu/drm/drm_panic_qr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_panic_qr.rs +1
-1@@ -415,7 +415,7 @@ fn next(&mut self) -> Option<Self::Item> { self.carry_len -= out_len;let pow = u64::pow (10 , self.carry_lenas u32 );let out = (self.carry / pow)as u16 ; - self.carry = self.carry % pow; + self.carry %= pow;Some ((out,NUM_CHARS_BITS [out_len])) } }base-commit:
c0eb65494e59d9834af7cbad983629e9017b25a1