From 1100f54e569e97a693cd2d9efa2123db3e0ac0bf Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Wed, 19 Mar 2025 16:04:05 -0700 Subject: [PATCH] Add a small TODO --- src/icu.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/icu.rs b/src/icu.rs index 815b226..cc60ee3 100644 --- a/src/icu.rs +++ b/src/icu.rs @@ -367,6 +367,7 @@ extern "C" fn utext_access(ut: &mut icu_ffi::UText, native_index: i64, forward: // If we've only seen ASCII so far we can fast-pass the UTF-16 translation, // because we can just widen from u8 -> u16. if utf16_len == ascii_len { + // TODO: This crashes, why? let haystack = &chunk[..utf8_len_limit - ascii_len]; // When it comes to performance, and the search space is small (which it is here), // it's always a good idea to keep the loops small and tight...