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