Skip to main content

match_ligature

Function match_ligature 

Source
fn match_ligature(head: &[u8]) -> Option<char>
Expand description

3-byte ligatures (ASCII keys → Latin char). Only four entries, so a match beats phf::Map here: the compiler lowers it to a small jump table, branch prediction nails the common ASCII miss path, and the match keeps the keys inlined as immediates rather than reaching out to a static array.