MCPcopy Create free account
hub / github.com/davidblewett/rure-python / p

Function p

regex/src/utf8.rs:161–166  ·  view source on GitHub ↗
(given_cp: char)

Source from the content-addressed store, hash-verified

159 #[test]
160 fn prop_roundtrip() {
161 fn p(given_cp: char) -> bool {
162 let mut tmp = [0; 4];
163 let encoded_len = given_cp.encode_utf8(&mut tmp).len();
164 let (got_cp, got_len) = decode_utf8(&tmp[..encoded_len]).unwrap();
165 encoded_len == got_len && given_cp == got_cp
166 }
167 quickcheck(p as fn(char) -> bool)
168 }
169

Callers

nothing calls this directly

Calls 6

decode_utf8Function · 0.85
decode_last_utf8Function · 0.85
unwrapMethod · 0.80
lenMethod · 0.45
as_bytesMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected