diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-04 15:49:30 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | 16b6295afc4f7aee0e4aba4f2217b124524843d0 (patch) | |
| tree | b2e7478aee643b0f5902abd7a60aab856f4ea6f7 /plugins | |
| parent | e180c955f9397849bdb1ea08f1e913ebac71ed5d (diff) | |
[Rust] Misc clippy lints
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/pdb-ng/src/lib.rs | 2 | ||||
| -rw-r--r-- | plugins/pdb-ng/src/type_parser.rs | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/plugins/pdb-ng/src/lib.rs b/plugins/pdb-ng/src/lib.rs index 2c1049b0..188b2ed5 100644 --- a/plugins/pdb-ng/src/lib.rs +++ b/plugins/pdb-ng/src/lib.rs @@ -540,7 +540,7 @@ impl PDBParser { impl CustomDebugInfoParser for PDBParser { fn is_valid(&self, view: &BinaryView) -> bool { - view.type_name().to_string() == "PE" || is_pdb(view) + view.type_name() == "PE" || is_pdb(view) } fn parse_info( diff --git a/plugins/pdb-ng/src/type_parser.rs b/plugins/pdb-ng/src/type_parser.rs index 7910e13a..61c64218 100644 --- a/plugins/pdb-ng/src/type_parser.rs +++ b/plugins/pdb-ng/src/type_parser.rs @@ -1759,9 +1759,8 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> { structure.width(data.size); self.namespace_stack.push(union_name.to_string()); - let success = self.parse_union_fields(&mut structure, data.fields, finder); + let _success = self.parse_union_fields(&mut structure, data.fields, finder); self.namespace_stack.pop(); - let _ = success?; let new_type = Type::structure(structure.finalize().as_ref()); Ok(Some(Box::new(ParsedType::Named(union_name, new_type)))) @@ -2015,7 +2014,11 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> { // for some reason if let Some(raw_name) = Self::type_data_to_raw_name(&parsed) { if let Some(&full_index) = self.full_type_indices.get(&raw_name) { - if let None = self.type_stack.iter().find(|&&idx| idx == full_index) + if self + .type_stack + .iter() + .find(|&&idx| idx == full_index) + .is_none() { if full_index != index { return self.try_type_index_to_bare( @@ -2050,8 +2053,11 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> { // for some reason if let Some(raw_name) = Self::type_data_to_raw_name(&parsed) { if let Some(&full_index) = self.full_type_indices.get(&raw_name) { - if let None = - self.type_stack.iter().find(|&&idx| idx == full_index) + if self + .type_stack + .iter() + .find(|&&idx| idx == full_index) + .is_none() { if full_index != index { return self.try_type_index_to_bare( |
