summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-08 21:50:23 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit6617b0afa09f549d0a5c9c53063f3ad8ab82b7e4 (patch)
treec5b6dc0ba8d257b77c4e62611ec64a6d2377a94b /rust
parentadbd39ab7c3d4e67e8709af43176e60f31141ba8 (diff)
[Rust] Fix misc typos
Diffstat (limited to 'rust')
-rw-r--r--rust/Cargo.toml5
-rw-r--r--rust/src/high_level_il/token_emitter.rs4
-rw-r--r--rust/src/interaction/handler.rs6
-rw-r--r--rust/tests/language_representation.rs54
4 files changed, 36 insertions, 33 deletions
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 361b2057..aecffb99 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -22,4 +22,7 @@ thiserror = "2.0"
[dev-dependencies]
rstest = "0.24"
tempfile = "3.15"
-serial_test = "3.2" \ No newline at end of file
+serial_test = "3.2"
+
+[package.metadata.typos]
+default.extend-ignore-re = ["Collapsable"] \ No newline at end of file
diff --git a/rust/src/high_level_il/token_emitter.rs b/rust/src/high_level_il/token_emitter.rs
index 2f1236a9..864ee50d 100644
--- a/rust/src/high_level_il/token_emitter.rs
+++ b/rust/src/high_level_il/token_emitter.rs
@@ -50,11 +50,11 @@ impl HighLevelILTokenEmitter {
};
}
- pub fn has_collapsable_regions(&self) -> bool {
+ pub fn has_collapsible_regions(&self) -> bool {
unsafe { BNHighLevelILTokenEmitterHasCollapsableRegions(self.handle.as_ptr()) }
}
- pub fn set_has_collapsable_regions(&self, state: bool) {
+ pub fn set_has_collapsible_regions(&self, state: bool) {
unsafe { BNHighLevelILTokenEmitterSetHasCollapsableRegions(self.handle.as_ptr(), state) };
}
diff --git a/rust/src/interaction/handler.rs b/rust/src/interaction/handler.rs
index fa1681d1..23ca66e4 100644
--- a/rust/src/interaction/handler.rs
+++ b/rust/src/interaction/handler.rs
@@ -264,17 +264,17 @@ impl InteractionHandlerTask {
};
let progress_ctxt = progress as *mut P as *mut c_void;
- ffi_wrap!("custom_interation_run_progress_dialog", unsafe {
+ ffi_wrap!("custom_interaction_run_progress_dialog", unsafe {
task(
self.ctxt,
- Some(cb_custom_interation_handler_task::<P>),
+ Some(cb_custom_interaction_handler_task::<P>),
progress_ctxt,
)
})
}
}
-unsafe extern "C" fn cb_custom_interation_handler_task<P: FnMut(usize, usize) -> bool>(
+unsafe extern "C" fn cb_custom_interaction_handler_task<P: FnMut(usize, usize) -> bool>(
ctxt: *mut c_void,
cur: usize,
max: usize,
diff --git a/rust/tests/language_representation.rs b/rust/tests/language_representation.rs
index 5c034c2f..c3d60966 100644
--- a/rust/tests/language_representation.rs
+++ b/rust/tests/language_representation.rs
@@ -91,7 +91,7 @@ impl LanguageRepresentationFunction for MyLangRepr {
Unimpl | Unreachable | Undef => panic!(),
_kind => {
tokens.append(InstructionTextToken::new(
- format!("other instr {:x}\n", instr.address),
+ format!("other instr 0x{:x}\n", instr.address),
InstructionTextTokenKind::Text,
));
}
@@ -155,32 +155,32 @@ fn test_custom_language_representation() {
assert_eq!(
format!("{output}"),
"block 26
-other instr 36775
-other instr 3679e
-other instr 3679e
-other instr 367ba
-other instr 367e6
-other instr 3682f
-other instr 3682f
-other instr 36834
-other instr 3683e
-other instr 3684e
-other instr 36867
-other instr 36881
-other instr 36881
-other instr 36881
-other instr 36896
-other instr 368a0
-other instr 368bb
-other instr 368d2
-other instr 3694a
-other instr 36960
-other instr 369e1
-other instr 369ec
-other instr 36a2e
-other instr 36ab5
-other instr 36abd
-other instr 36ac2
+other instr 0x36775
+other instr 0x3679e
+other instr 0x3679e
+other instr 0x367ba
+other instr 0x367e6
+other instr 0x3682f
+other instr 0x3682f
+other instr 0x36834
+other instr 0x3683e
+other instr 0x3684e
+other instr 0x36867
+other instr 0x36881
+other instr 0x36881
+other instr 0x36881
+other instr 0x36896
+other instr 0x368a0
+other instr 0x368bb
+other instr 0x368d2
+other instr 0x3694a
+other instr 0x36960
+other instr 0x369e1
+other instr 0x369ec
+other instr 0x36a2e
+other instr 0x36ab5
+other instr 0x36abd
+other instr 0x36ac2
"
);
}