summaryrefslogtreecommitdiff
path: root/rust/examples/dwarf/dwarf_export/src
diff options
context:
space:
mode:
authorMichael Krasnitski <michael.krasnitski@gmail.com>2024-04-16 19:32:04 -0400
committerKyle Martin <krm504@nyu.edu>2024-05-09 13:11:41 -0400
commit29b62677dad48aa4d55ad2dae5d176d9880216bd (patch)
treef205a5f4ebb7e71ea132fe06a7076c70616d3c62 /rust/examples/dwarf/dwarf_export/src
parent608f261e6bca5869e748d4509da92a5717dce75d (diff)
Fix clippy warnings and run rustfmt
Diffstat (limited to 'rust/examples/dwarf/dwarf_export/src')
-rw-r--r--rust/examples/dwarf/dwarf_export/src/lib.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/rust/examples/dwarf/dwarf_export/src/lib.rs b/rust/examples/dwarf/dwarf_export/src/lib.rs
index ef71f1ae..057abe27 100644
--- a/rust/examples/dwarf/dwarf_export/src/lib.rs
+++ b/rust/examples/dwarf/dwarf_export/src/lib.rs
@@ -522,13 +522,11 @@ fn export_data_vars(
for data_variable in &bv.data_variables() {
if let Some(symbol) = data_variable.symbol(bv) {
- if symbol.sym_type() == SymbolType::External {
- continue;
- } else if symbol.sym_type() == SymbolType::Function {
- continue;
- } else if symbol.sym_type() == SymbolType::ImportedFunction {
- continue;
- } else if symbol.sym_type() == SymbolType::LibraryFunction {
+ if let SymbolType::External
+ | SymbolType::Function
+ | SymbolType::ImportedFunction
+ | SymbolType::LibraryFunction = symbol.sym_type()
+ {
continue;
}
}