MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / parse_number_unit

Function parse_number_unit

cel/src/duration.rs:66–71  ·  view source on GitHub ↗
(i: &str)

Source from the content-addressed store, hash-verified

64}
65
66fn parse_number_unit(i: &str) -> IResult<&str, Duration> {
67 let (i, num) = double(i)?;
68 let (i, unit) = parse_unit(i)?;
69 let duration = to_duration(num, unit);
70 Ok((i, duration))
71}
72
73fn parse_negative(i: &str) -> IResult<&str, ()> {
74 let (i, _): (&str, char) = char('-')(i)?;

Callers

nothing calls this directly

Calls 3

parse_unitFunction · 0.85
to_durationFunction · 0.85
doubleFunction · 0.70

Tested by

no test coverage detected