diff --git a/src/libdwarf/src/eh.rs b/src/libdwarf/src/eh.rs index c7fd15b..b402864 100644 --- a/src/libdwarf/src/eh.rs +++ b/src/libdwarf/src/eh.rs @@ -83,10 +83,7 @@ unsafe fn get_ttype_entry( encoding | DW_EH_PE_pcrel, ttype_base, ) - .map(|v| match v { - ttype_base => None, - ttype_entry => Some(ttype_entry as *const u8), - }) + .map(|v| (v != ttype_base).then(|| v as *const u8)) } pub unsafe fn find_eh_action(