Enable clippy::cast_abs_to_unsigned (#8912)

Thankfully this one is a simple, single change that also prevents
overflow in the `abs()`
This commit is contained in:
Kirpal Grewal 2024-03-06 17:21:48 +00:00 committed by GitHub
parent 2f15676b7c
commit b622dcbc64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -107,7 +107,7 @@ pub fn scroll_report(
pub fn alt_scroll(scroll_lines: i32) -> Vec<u8> {
let cmd = if scroll_lines > 0 { b'A' } else { b'B' };
let mut content = Vec::with_capacity(scroll_lines.abs() as usize * 3);
let mut content = Vec::with_capacity(scroll_lines.unsigned_abs() as usize * 3);
for _ in 0..scroll_lines.abs() {
content.push(0x1b);
content.push(b'O');