MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / metric_location

Function metric_location

libatomic/src/review/presentation.rs:46–56  ·  view source on GitHub ↗
(node: &GraphNode, side: &str)

Source from the content-addressed store, hash-verified

44}
45
46pub(super) fn metric_location(node: &GraphNode, side: &str) -> (Option<u32>, Option<u32>) {
47 let location = &node.properties[format!("{side}_location")];
48 (
49 location["start_line"]
50 .as_u64()
51 .and_then(|n| n.try_into().ok()),
52 location["end_line"]
53 .as_u64()
54 .and_then(|n| n.try_into().ok()),
55 )
56}
57
58pub(super) fn regions(graph: &ReviewGraph) -> Vec<Region> {
59 let mut regions = BTreeMap::new();

Callers 2

collect_requestsFunction · 0.85
regionsFunction · 0.85

Calls 2

as_u64Method · 0.80
okMethod · 0.45

Tested by

no test coverage detected