Skip to main content

bridge_needle

Function bridge_needle 

Source
fn bridge_needle(
    n_bytes: &[u8],
    n_folded: bool,
    p_folded: bool,
) -> Option<Cow<'_, [u8]>>
Expand description

Needle-domain bridge: a byte needle proven about one pool implies one about the other only in the orig→folded direction. Valid-UTF-8 needles can only match at code-point boundaries and folding is length-preserving per code point, so a name matching n at offset i guarantees the lower pool holds fold(n) at i. The reverse (folded match → original bytes) does not hold.