Replace get(..).unwrap() with indexing
This commit is contained in:
parent
f6e5ce39d2
commit
a1920fdcfa
@ -11,13 +11,7 @@ pub enum Location {
|
||||
impl Location {
|
||||
pub fn addr(&self, symbol_tables: &SymbolTables) -> u32 {
|
||||
match self {
|
||||
Self::Symbol((table, sym)) => symbol_tables
|
||||
.get(table)
|
||||
.unwrap()
|
||||
.symbols
|
||||
.get(sym)
|
||||
.unwrap()
|
||||
.value(),
|
||||
Self::Symbol((table, sym)) => symbol_tables[table].symbols[sym].value(),
|
||||
Self::Address(addr) => *addr,
|
||||
}
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ fn breakpoint_set_at(
|
||||
table
|
||||
.breakpoints
|
||||
.iter()
|
||||
.map(|sym| table.symbols.get(sym).unwrap())
|
||||
.map(|sym| &table.symbols[sym])
|
||||
.any(|sym| sym.value() == addr)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user