Skip to content

Commit

Permalink
Rust API misc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
emesare committed Feb 11, 2025
1 parent f7b92a5 commit 334ea43
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion plugins/dwarf/shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ pub fn create_section_reader<'a, Endian: 'a + Endianity>(
}
}
// Truncate Mach-O section names to 16 bytes
else if let Some(section) = view.section_by_name("__".to_string() + &section_name[1..section_name.len().min(15)]) {
else if let Some(section) =
view.section_by_name("__".to_string() + &section_name[1..section_name.len().min(15)])
{
Ok(EndianRcSlice::new(
Rc::from(view.read_vec(section.start(), section.len()).as_slice()),
endian,
Expand Down
4 changes: 3 additions & 1 deletion rust/src/disassembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,9 @@ impl From<InstructionTextTokenKind> for BNInstructionTextTokenType {
}
InstructionTextTokenKind::Opcode => BNInstructionTextTokenType::OpcodeToken,
InstructionTextTokenKind::String { .. } => BNInstructionTextTokenType::StringToken,
InstructionTextTokenKind::StringContent { .. } => BNInstructionTextTokenType::StringToken,
InstructionTextTokenKind::StringContent { .. } => {
BNInstructionTextTokenType::StringToken
}
InstructionTextTokenKind::CharacterConstant => {
BNInstructionTextTokenType::CharacterConstantToken
}
Expand Down
2 changes: 1 addition & 1 deletion rust/src/flowgraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl FlowGraph {
let arch = CoreArchitecture::from_raw(arch_ptr);
BNFreeFunction(func_ptr);
Ok(RegularLowLevelILFunction::ref_from_raw(arch, llil_ptr))
},
}
true => Err(()),
}
}
Expand Down

0 comments on commit 334ea43

Please sign in to comment.