Skip to content

Commit d0aa51b

Browse files
committed
Formatting
1 parent 4a78742 commit d0aa51b

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

objdiff-core/src/obj/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,19 @@ impl Object {
328328
self.symbols.iter().position(|symbol| symbol.section.is_some() && symbol.name == name)
329329
}
330330

331-
pub fn get_flow_analysis_result(&self, symbol: &Symbol) -> Option<&Box<dyn FlowAnalysisResult>> {
331+
pub fn get_flow_analysis_result(
332+
&self,
333+
symbol: &Symbol,
334+
) -> Option<&Box<dyn FlowAnalysisResult>> {
332335
let key = symbol.section.unwrap_or_default() as u64 + symbol.address;
333336
self.flow_analysis_results.get(&key)
334337
}
335338

336-
pub fn add_flow_analysis_result(&mut self, symbol: &Symbol, result: Box<dyn FlowAnalysisResult>) {
339+
pub fn add_flow_analysis_result(
340+
&mut self,
341+
symbol: &Symbol,
342+
result: Box<dyn FlowAnalysisResult>,
343+
) {
337344
let key = symbol.section.unwrap_or_default() as u64 + symbol.address;
338345
self.flow_analysis_results.insert(key, result);
339346
}

objdiff-core/src/obj/read.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ use core::{cmp::Ordering, num::NonZeroU64};
88

99
use anyhow::{Context, Result, anyhow, bail, ensure};
1010
use object::{Object as _, ObjectSection as _, ObjectSymbol as _};
11-
use crate::obj::FlowAnalysisResult;
1211

1312
use crate::{
1413
arch::{Arch, new_arch},
1514
diff::DiffObjConfig,
1615
obj::{
17-
Object, Relocation, RelocationFlags, Section, SectionData, SectionFlag, SectionKind,
18-
Symbol, SymbolFlag, SymbolKind,
16+
FlowAnalysisResult, Object, Relocation, RelocationFlags, Section, SectionData, SectionFlag,
17+
SectionKind, Symbol, SymbolFlag, SymbolKind,
1918
split_meta::{SPLITMETA_SECTION, SplitMeta},
2019
},
2120
util::{align_data_slice_to, align_u64_to, read_u16, read_u32},
@@ -476,7 +475,9 @@ fn perform_data_flow_analysis(obj: &mut Object, config: &DiffObjConfig) -> Resul
476475

477476
// Optional full data flow analysis
478477
if config.analyze_data_flow {
479-
if let Some(flow_result) = obj.arch.data_flow_analysis(obj, symbol, code, &section.relocations) {
478+
if let Some(flow_result) =
479+
obj.arch.data_flow_analysis(obj, symbol, code, &section.relocations)
480+
{
480481
generated_flow_results.push((symbol.clone(), flow_result));
481482
}
482483
}

0 commit comments

Comments
 (0)