mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
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:
parent
2f15676b7c
commit
b622dcbc64
@ -372,7 +372,6 @@ almost_complete_range = "allow"
|
|||||||
arc_with_non_send_sync = "allow"
|
arc_with_non_send_sync = "allow"
|
||||||
await_holding_lock = "allow"
|
await_holding_lock = "allow"
|
||||||
borrowed_box = "allow"
|
borrowed_box = "allow"
|
||||||
cast_abs_to_unsigned = "allow"
|
|
||||||
derive_ord_xor_partial_ord = "allow"
|
derive_ord_xor_partial_ord = "allow"
|
||||||
eq_op = "allow"
|
eq_op = "allow"
|
||||||
let_underscore_future = "allow"
|
let_underscore_future = "allow"
|
||||||
|
@ -107,7 +107,7 @@ pub fn scroll_report(
|
|||||||
pub fn alt_scroll(scroll_lines: i32) -> Vec<u8> {
|
pub fn alt_scroll(scroll_lines: i32) -> Vec<u8> {
|
||||||
let cmd = if scroll_lines > 0 { b'A' } else { b'B' };
|
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() {
|
for _ in 0..scroll_lines.abs() {
|
||||||
content.push(0x1b);
|
content.push(0x1b);
|
||||||
content.push(b'O');
|
content.push(b'O');
|
||||||
|
Loading…
Reference in New Issue
Block a user