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

Function inner

regex/tests/api.rs:116–120  ·  view source on GitHub ↗

This is a test of whether the types on `caps["..."]` are general enough. If not, this will fail to typecheck.

(s: &str)

Source from the content-addressed store, hash-verified

114 // This is a test of whether the types on `caps["..."]` are general
115 // enough. If not, this will fail to typecheck.
116 fn inner(s: &str) -> usize {
117 let re = regex!(r"(?P<number>\d+)");
118 let caps = re.captures(t!(s)).unwrap();
119 caps["number"].len()
120 }
121 assert_eq!(3, inner("123"));
122}
123

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.80
capturesMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected