Conversation
|
If you want to modify |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Had to add an extra array to `L2Lut` to account for characters that change plane when case-mapped (so far, only U+1DF95 LATIN SMALL LIGATURE LONG S WITH DESCENDER S). Also made `version()` defer to `ucd_parse::ucd_directory_version()`, which is more robust to minor changes in the ReadMe.txt format.
2172303 to
7c12ed8
Compare
| if let Ok(idx) = l2_lut.exceptions.binary_search_by_key(&input_low, |&(p, _)| p) { | ||
| // SAFETY: binary search guarantees that the index is in bounds. | ||
| let &(_, output) = unsafe { l2_lut.exceptions.get_unchecked(idx) }; | ||
| return Some(output); | ||
| } | ||
|
|
There was a problem hiding this comment.
Do we really need to binary search through a list this small? It generates to only 0 or 1 item from what I can see.
|
r? clarfonthey I'll take this over since I already reviewed a similar PR that was closed. Knew about the exceptions, wasn't sure how exactly they should be handled, but I like this method. |
Had to add an extra array to
L2Lutto account for characters that change plane when case-mapped (so far, only U+1DF95 LATIN SMALL LIGATURE LONG S WITH DESCENDER S).Also made
version()defer toucd_parse::ucd_directory_version(), which is more robust to minor changes in the ReadMe.txt format.