Skip to content

Commit 814f46c

Browse files
committed
Minor cleanup around IndexSet
1 parent ff10c0f commit 814f46c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/debuginfo/line_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl FunctionDebugContext {
165165
for &MachSrcLoc { start, end, loc } in mcr.buffer.get_srclocs_sorted() {
166166
debug_context.dwarf.unit.line_program.row().address_offset = u64::from(start);
167167
if !loc.is_default() {
168-
let source_loc = *self.source_loc_set.get_index(loc.bits() as usize).unwrap();
168+
let source_loc = self.source_loc_set[loc.bits() as usize];
169169
create_row_for_span(debug_context, source_loc);
170170
} else {
171171
create_row_for_span(debug_context, self.function_source_loc);

src/debuginfo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub(crate) struct DebugContext {
3838
pub(crate) struct FunctionDebugContext {
3939
entry_id: UnitEntryId,
4040
function_source_loc: (FileId, u64, u64),
41-
source_loc_set: indexmap::IndexSet<(FileId, u64, u64)>,
41+
source_loc_set: IndexSet<(FileId, u64, u64)>,
4242
}
4343

4444
impl DebugContext {

0 commit comments

Comments
 (0)