Skip to content

Commit 85b5253

Browse files
authored
Merge pull request rust-lang#1382 from cuviper/indexmap-2
Upgrade to indexmap v2
2 parents e44f47a + 814f46c commit 85b5253

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

Cargo.lock

Lines changed: 25 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ target-lexicon = "0.12.0"
1818
gimli = { version = "0.27.2", default-features = false, features = ["write"]}
1919
object = { version = "0.30.3", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
2020

21-
indexmap = "1.9.3"
21+
indexmap = "2.0.0"
2222
libloading = { version = "0.7.3", optional = true }
2323
smallvec = "1.8.1"
2424

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)