The follwing code, with the input.txt file panics both on 0.3.18 and on the current main branch (3bf3403a74e4a73e15008001c81c09062e13f280).
use unicode_bidi::{BidiInfo, Level};
fn main() {
let text = include_str!("input.txt");
let range = 3071..3082;
assert_eq!(&text[range.clone()], "@@@><”\03:");
let bidi = BidiInfo::new(text, Some(Level::ltr()));
let para = bidi.paragraphs.first().unwrap();
assert_eq!(para.range, 0..3637);
assert_eq!(para.level, Level::ltr());
bidi.visual_runs(para, range);
}
input.txt
thread 'main' panicked at .../.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-bidi-0.3.18/src/lib.rs:956:47:
Level error: OutOfRangeNumber
The follwing code, with the
input.txtfile panics both on0.3.18and on the currentmainbranch (3bf3403a74e4a73e15008001c81c09062e13f280).input.txt