re-enable cast_possible_truncation lint
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user