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
+6 -2
View File
@@ -39,11 +39,15 @@ const fn create_character_lookup_table() -> [Span<'static>; u8::CARDINALITY] {
let mut index = 0;
while index < u8::CARDINALITY {
result[index].style = style_for_character(index as u8);
#[allow(clippy::cast_possible_truncation)]
let byte = index as u8;
result[index].style = style_for_character(byte);
mem::forget(mem::replace(
&mut result[index].content,
content_for_character(index as u8)
content_for_character(byte)
));
index += 1;
}