From b653d6fa3d03a642bf32372ee78de6fc5135cb28 Mon Sep 17 00:00:00 2001 From: Mauro D Date: Thu, 13 Oct 2022 14:59:32 +0000 Subject: [PATCH] Update single byte decoder. --- src/decoders/charsets/single_byte.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/decoders/charsets/single_byte.rs b/src/decoders/charsets/single_byte.rs index 77760e4..8d6676b 100644 --- a/src/decoders/charsets/single_byte.rs +++ b/src/decoders/charsets/single_byte.rs @@ -13,6 +13,11 @@ fn single_byte_decoder(table: &[char], bytes: &[u8]) -> String { let mut result = String::with_capacity(bytes.len() * 2); for byte in bytes { + #[cfg(feature = "ludicrous_mode")] + unsafe { + result.push(*table.get_unchecked(*byte as usize)); + } + #[cfg(not(feature = "ludicrous_mode"))] result.push(table[*byte as usize]); }