summaryrefslogtreecommitdiff
path: root/plugins/warp/src/cache.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-30 17:38:40 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commitc3fdda9727f5507818e3f55576ad32215a22b0f9 (patch)
treed522025055eb7253c7f2cb94732402aacf2afbfc /plugins/warp/src/cache.rs
parentc3f344a38ca4b027b4e69b0f82d3184622d6da79 (diff)
[Rust] Remove Architecture trait bound on LLIL related structures
Diffstat (limited to 'plugins/warp/src/cache.rs')
-rw-r--r--plugins/warp/src/cache.rs20
1 files changed, 6 insertions, 14 deletions
diff --git a/plugins/warp/src/cache.rs b/plugins/warp/src/cache.rs
index 4b1df5af..7219b547 100644
--- a/plugins/warp/src/cache.rs
+++ b/plugins/warp/src/cache.rs
@@ -1,6 +1,5 @@
use crate::convert::{from_bn_symbol, from_bn_type_internal};
use crate::{build_function, function_guid};
-use binaryninja::architecture::Architecture;
use binaryninja::binary_view::{BinaryView, BinaryViewExt};
use binaryninja::confidence::MAX_CONFIDENCE;
use binaryninja::function::Function as BNFunction;
@@ -68,10 +67,7 @@ pub fn try_cached_function_match(function: &BNFunction) -> Option<Function> {
.to_owned()
}
-pub fn cached_function<A: Architecture>(
- function: &BNFunction,
- llil: &RegularLowLevelILFunction<A>,
-) -> Function {
+pub fn cached_function(function: &BNFunction, llil: &RegularLowLevelILFunction) -> Function {
let view = function.view();
let view_id = ViewID::from(view.as_ref());
let function_cache = FUNCTION_CACHE.get_or_init(Default::default);
@@ -122,9 +118,9 @@ where
}
}
-pub fn cached_function_guid<A: Architecture, M: FunctionMutability>(
+pub fn cached_function_guid<M: FunctionMutability>(
function: &BNFunction,
- llil: &LowLevelILFunction<A, M, NonSSA<RegularNonSSA>>,
+ llil: &LowLevelILFunction<M, NonSSA<RegularNonSSA>>,
) -> FunctionGUID {
let view = function.view();
let view_id = ViewID::from(view);
@@ -202,11 +198,7 @@ pub struct FunctionCache {
}
impl FunctionCache {
- pub fn function<A: Architecture>(
- &self,
- function: &BNFunction,
- llil: &RegularLowLevelILFunction<A>,
- ) -> Function {
+ pub fn function(&self, function: &BNFunction, llil: &RegularLowLevelILFunction) -> Function {
let function_id = FunctionID::from(function);
match self.cache.get(&function_id) {
Some(function) => function.value().to_owned(),
@@ -330,10 +322,10 @@ impl GUIDCache {
}
}
- pub fn function_guid<A: Architecture, M: FunctionMutability>(
+ pub fn function_guid<M: FunctionMutability>(
&self,
function: &BNFunction,
- llil: &LowLevelILFunction<A, M, NonSSA<RegularNonSSA>>,
+ llil: &LowLevelILFunction<M, NonSSA<RegularNonSSA>>,
) -> FunctionGUID {
let function_id = FunctionID::from(function);
match self.cache.get(&function_id) {