MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / get_num

Function get_num

flow-rs/src/config/parser.rs:17–25  ·  view source on GitHub ↗
(data: &'a InnerData)

Source from the content-addressed store, hash-verified

15use unstructured::*;
16
17fn get_num<'a, T>(data: &'a InnerData) -> T
18where
19 T: From<&'a Number>,
20{
21 match data {
22 Unstructured::Number(n) => n.into(),
23 _ => unreachable!(),
24 }
25}
26
27fn range_impl(start: i64, end: i64, step: i64) -> Vec<i64> {
28 (start..end).step_by(step as usize).collect()

Callers 1

rangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected