diff options
| author | Mason Reed <mason@vector35.com> | 2025-12-04 15:10:40 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-12-05 12:26:29 -0500 |
| commit | 6546844ca4274cd11ec2c91da7c6d7b5e8a82d0b (patch) | |
| tree | 7341b815993247cba9df7ea95585ce9723510fa0 /plugins/warp/src | |
| parent | 6eb12c3c3f53079a822881bf6e197105b25a0fe3 (diff) | |
[Rust] Fix misc clippy lints and warnings
These are introduced after changing to Rust 1.91.1
Diffstat (limited to 'plugins/warp/src')
| -rw-r--r-- | plugins/warp/src/cache/type_reference.rs | 2 | ||||
| -rw-r--r-- | plugins/warp/src/convert/types.rs | 2 | ||||
| -rw-r--r-- | plugins/warp/src/lib.rs | 2 | ||||
| -rw-r--r-- | plugins/warp/src/plugin.rs | 4 |
4 files changed, 6 insertions, 4 deletions
diff --git a/plugins/warp/src/cache/type_reference.rs b/plugins/warp/src/cache/type_reference.rs index 0b07c139..2c59c2fb 100644 --- a/plugins/warp/src/cache/type_reference.rs +++ b/plugins/warp/src/cache/type_reference.rs @@ -39,7 +39,7 @@ pub fn cached_type_reference( } } -pub fn cached_type_references(view: &BinaryView) -> Option<Ref<ViewID, TypeRefCache>> { +pub fn cached_type_references(view: &BinaryView) -> Option<Ref<'_, ViewID, TypeRefCache>> { let view_id = ViewID::from(view); let type_ref_cache = TYPE_REF_CACHE.get_or_init(Default::default); type_ref_cache.get(&view_id) diff --git a/plugins/warp/src/convert/types.rs b/plugins/warp/src/convert/types.rs index 2401a039..f8ead6af 100644 --- a/plugins/warp/src/convert/types.rs +++ b/plugins/warp/src/convert/types.rs @@ -281,7 +281,7 @@ pub fn to_bn_calling_convention<A: BNArchitecture>( // Always pass the architecture unless you know what you're doing! pub fn to_bn_type<A: BNArchitecture + Copy>(arch: Option<A>, ty: &Type) -> BNRef<BNType> { - let bits_to_bytes = |val: u64| (val / 8); + let bits_to_bytes = |val: u64| val / 8; let addr_size = arch.map(|a| a.address_size()).unwrap_or(8) as u64; match &ty.class { TypeClass::Void => BNType::void(), diff --git a/plugins/warp/src/lib.rs b/plugins/warp/src/lib.rs index 9f40acef..1e622d58 100644 --- a/plugins/warp/src/lib.rs +++ b/plugins/warp/src/lib.rs @@ -254,7 +254,7 @@ pub fn basic_block_guid<M: FunctionMutability>( pub fn filtered_instructions_at<M: FunctionMutability>( il: &LowLevelILFunction<M, NonSSA>, addr: u64, -) -> Vec<LowLevelILInstruction<M, NonSSA>> { +) -> Vec<LowLevelILInstruction<'_, M, NonSSA>> { il.instructions_at(addr) .into_iter() .enumerate() diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs index f384a6f5..9fe6cd3f 100644 --- a/plugins/warp/src/plugin.rs +++ b/plugins/warp/src/plugin.rs @@ -19,7 +19,6 @@ use log::LevelFilter; mod commit; mod create; -mod debug; mod ffi; mod file; mod function; @@ -29,6 +28,9 @@ mod render_layer; mod settings; mod workflow; +#[cfg(debug_assertions)] +mod debug; + fn load_bundled_signatures() { let global_bn_settings = Settings::new(); let plugin_settings = |
