(node: &GraphNode, side: &str)
| 44 | } |
| 45 | |
| 46 | pub(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 | |
| 58 | pub(super) fn regions(graph: &ReviewGraph) -> Vec<Region> { |
| 59 | let mut regions = BTreeMap::new(); |
no test coverage detected