You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thought: maybe is_normalized_up_to should return this tuple, because split_at will be an additional bounds check and a potential panic. The length can be recovered by doing .0.len() if that's needed.
That would probably imply a change to method naming, too.
The text was updated successfully, but these errors were encountered:
@hsivonen Should it use split_at? If we return the result of split_at from ICU4X, we'd need to use split_at_unchecked for it to make sense performance-wise
manishearth: we shouldn't panic if possible, let's split_at_checked with gigo behavior for broken stuff (perhaps return (empty, entire_string) or vice versa). We can optimize later if needed.
@sffc I think returning a pair of str is better. The caller of this API is likely going to want the string slices, and it's easy for them to recover the index
@sffc Would be nice to use split_at_checked but it is MSRV 1.80
manishearth: Rust 1.80 was released in July. It seems like 2.0 is a good time to increase the MSRV.
@hsivonen So then should is_normalized_up_to be public or private, in Rust and FFI?
@sffc The Rust fn should return the string slices and the FFI fn should return the index.
From #5216 (review):
That would probably imply a change to method naming, too.
The text was updated successfully, but these errors were encountered: