re-enable cast_possible_truncation lint

This commit is contained in:
alice pellerin
2026-05-01 01:13:58 -05:00
parent 35a01b9128
commit 80c8c2ed81
7 changed files with 98 additions and 79 deletions
+3 -3
View File
@@ -61,8 +61,8 @@ impl Widget for &Buffer {
let popup_area = popup
.area_at(
area.x + byte_column_to_screen_column(hex_column) as u16,
area.y + (position_on_screen / BYTES_PER_LINE) as u16 + 1
area.x + byte_column_to_screen_column(hex_column),
area.y + u16::try_from(position_on_screen / BYTES_PER_LINE).unwrap() + 1
)
.clamp(hex_area);
@@ -108,7 +108,7 @@ impl Buffer {
}
}
fn byte_column_to_screen_column(byte_column: usize) -> usize {
fn byte_column_to_screen_column(byte_column: usize) -> u16 {
match byte_column {
0 => 10,
1 => 13,