diff --git a/crates/analyzers/src/bounds.rs b/crates/analyzers/src/bounds.rs index 5ddbeedb..cf51782e 100644 --- a/crates/analyzers/src/bounds.rs +++ b/crates/analyzers/src/bounds.rs @@ -86,28 +86,25 @@ impl OrderedAnalysis { set.insert(init.into()); analyses.insert(source, set); } - ba.bound_changes - .iter() - .for_each(|bound_change| { - let (parts, unsat) = - range_parts(analyzer, arena, &ba.report_config, &bound_change.1); - let item = StrippedAnalysisItem { - init: false, - name: ba.var_display_name.clone(), - loc: LocSpan(bound_change.0 .1), - order: (bound_change.0.end() - bound_change.0.start()) as i32, //i as i32, - // storage: ba.storage.clone(), - ctx: ba.ctx, - ctx_conditionals: ba.conditionals(analyzer, arena), - parts, - unsat, - }; + ba.bound_changes.iter().for_each(|bound_change| { + let (parts, unsat) = range_parts(analyzer, arena, &ba.report_config, &bound_change.1); + let item = StrippedAnalysisItem { + init: false, + name: ba.var_display_name.clone(), + loc: LocSpan(bound_change.0 .1), + order: (bound_change.0.end() - bound_change.0.start()) as i32, //i as i32, + // storage: ba.storage.clone(), + ctx: ba.ctx, + ctx_conditionals: ba.conditionals(analyzer, arena), + parts, + unsat, + }; - let entry = analyses - .entry(*LocSpan(bound_change.0 .1).source()) - .or_default(); - entry.insert(item); - }); + let entry = analyses + .entry(*LocSpan(bound_change.0 .1).source()) + .or_default(); + entry.insert(item); + }); Self { analyses } } diff --git a/crates/graph/src/range/elem/map_or_array.rs b/crates/graph/src/range/elem/map_or_array.rs index 7954f60b..8e9d7048 100644 --- a/crates/graph/src/range/elem/map_or_array.rs +++ b/crates/graph/src/range/elem/map_or_array.rs @@ -286,8 +286,8 @@ impl RangeElem for RangeDyn { .map(|(k, (v, op))| { let mut new_k = k.clone(); let mut new_v = v.clone(); - let _ =new_k.arenaize(analyzer, arena); - let _ =new_v.arenaize(analyzer, arena); + let _ = new_k.arenaize(analyzer, arena); + let _ = new_v.arenaize(analyzer, arena); (new_k, (new_v, *op)) }) .collect(); diff --git a/crates/pyrometer/src/graph_backend.rs b/crates/pyrometer/src/graph_backend.rs index 2a840c08..b99f98ae 100644 --- a/crates/pyrometer/src/graph_backend.rs +++ b/crates/pyrometer/src/graph_backend.rs @@ -287,7 +287,9 @@ impl Elems { existing_node_idx } else { // make a new ContextVar Node for the Arena graph - let new_node_idx = graph.add_node(ArenaNode::CVAR(dep_elem.as_dot_str(graph_backend, arena).to_string())); + let new_node_idx = graph.add_node(ArenaNode::CVAR( + dep_elem.as_dot_str(graph_backend, arena).to_string(), + )); dependency_map.insert(dep_elem, new_node_idx); new_node_idx }; @@ -299,12 +301,12 @@ impl Elems { } Elem::ConcreteDyn(_range_dyn) => { let node_str = elem.arena_graph_node_label(); - + graph.add_node(ArenaNode::ELEM(node_str)) } Elem::Concrete(_range_concrete) => { let node_str = elem.arena_graph_node_label(); - + graph.add_node(ArenaNode::ELEM(node_str)) } Elem::Expr(range_expr) => { @@ -329,7 +331,9 @@ impl Elems { existing_node_idx } else { // make a new ContextVar Node for the Arena graph - let new_node_idx = graph.add_node(ArenaNode::CVAR(dep_elem.as_dot_str(graph_backend, arena).to_string())); + let new_node_idx = graph.add_node(ArenaNode::CVAR( + dep_elem.as_dot_str(graph_backend, arena).to_string(), + )); dependency_map.insert(*dep_elem, new_node_idx); new_node_idx }; @@ -360,7 +364,9 @@ impl Elems { existing_node_idx } else { // make a new ContextVar Node for the Arena graph - let new_node_idx = graph.add_node(ArenaNode::CVAR(dep_elem.as_dot_str(graph_backend, arena).to_string())); + let new_node_idx = graph.add_node(ArenaNode::CVAR( + dep_elem.as_dot_str(graph_backend, arena).to_string(), + )); dependency_map.insert(*dep_elem, new_node_idx); new_node_idx }; @@ -394,7 +400,7 @@ impl Elems { } Elem::Null => { let node_str = "null".to_string(); - + graph.add_node(ArenaNode::ELEM(node_str)) } }; @@ -505,10 +511,7 @@ flowchart TB let nodes_str = graph .node_indices() - .map(|idx| { - - arena_mermaid_node(graph, "\t", idx, true, true, None) - }) + .map(|idx| arena_mermaid_node(graph, "\t", idx, true, true, None)) .collect::>() .join("\n");