Skip to content

Commit f1cc349

Browse files
committed
fmt
1 parent 9f590f0 commit f1cc349

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

jingle/src/analysis/cfg/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ impl<N: CfgState, D: ModelTransition<N::Model>> PcodeCfg<N, D> {
138138
let old_idx = self.indices.get(old_weight.borrow()).copied();
139139
let new_idx = self.indices.get(new_weight.borrow()).copied();
140140

141-
tracing::debug!("replace_and_combine_nodes called: old_idx={:?}, new_idx={:?}", old_idx, new_idx);
141+
tracing::debug!(
142+
"replace_and_combine_nodes called: old_idx={:?}, new_idx={:?}",
143+
old_idx,
144+
new_idx
145+
);
142146

143147
if let (Some(old_idx), Some(new_idx)) = (old_idx, new_idx) {
144148
// If the indices are the same, the nodes are already merged - nothing to do
@@ -188,7 +192,9 @@ impl<N: CfgState, D: ModelTransition<N::Model>> PcodeCfg<N, D> {
188192
self.indices.remove(old_weight.borrow());
189193

190194
// Update the ops map: prefer the op from new_weight if it exists, otherwise use old_weight's op
191-
let op_to_keep = self.ops.get(new_weight.borrow())
195+
let op_to_keep = self
196+
.ops
197+
.get(new_weight.borrow())
192198
.or_else(|| self.ops.get(old_weight.borrow()))
193199
.cloned();
194200

@@ -197,7 +203,7 @@ impl<N: CfgState, D: ModelTransition<N::Model>> PcodeCfg<N, D> {
197203

198204
if let Some(op) = op_to_keep {
199205
self.ops.insert(new_weight.borrow().clone(), op);
200-
}else{
206+
} else {
201207
dbg!("Missing op!");
202208
}
203209
}

jingle/src/analysis/cpa/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,12 @@ where
136136
was_merged = true;
137137
}
138138
}
139-
if !was_merged{
139+
if !was_merged {
140140
// record that a new state was reach without merging
141-
tracing::debug!("Adding new state without merging: {}", StateDisplayWrapper(&dest_state));
141+
tracing::debug!(
142+
"Adding new state without merging: {}",
143+
StateDisplayWrapper(&dest_state)
144+
);
142145
reducer.new_state(&state, &dest_state, &op);
143146
}
144147

jingle/src/analysis/cpa/reducer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ where
7676
// from src->dst and add a new edge with no-op payload is not supported.
7777
// We only proceed when there is an op provided (matches unwinding impl).
7878
self.cfg.replace_and_combine_nodes(dest_state, merged_state);
79-
if let Some(op) = op{
79+
if let Some(op) = op {
8080
self.cfg.add_edge(state, merged_state, op);
8181
}
8282
}

jingle/src/analysis/direct_location/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ use crate::analysis::cpa::lattice::JoinSemiLattice;
66

77
use crate::analysis::cpa::lattice::pcode::PcodeAddressLattice;
88
use crate::analysis::cpa::reducer::CfgReducer;
9-
use crate::analysis::cpa::state::{AbstractState, LocationState, MergeOutcome, StateDisplay, Successor};
9+
use crate::analysis::cpa::state::{
10+
AbstractState, LocationState, MergeOutcome, StateDisplay, Successor,
11+
};
1012
use crate::analysis::cpa::{ConfigurableProgramAnalysis, IntoState};
1113
use crate::analysis::direct_valuation::VarnodeValue;
1214
use crate::analysis::pcode_store::PcodeStore;

0 commit comments

Comments
 (0)