Skip to content

Commit 76a3a9b

Browse files
committed
Fix double reference warnings
See rust-lang/rust#110955.
1 parent 3c0cde5 commit 76a3a9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/dwarfdump.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ fn main() {
497497
process::exit(1);
498498
}
499499
};
500-
let mmap_ref = (*arena_mmap.alloc(mmap)).borrow();
500+
let mmap_ref = &*arena_mmap.alloc(mmap);
501501
match object::File::parse(&**mmap_ref) {
502502
Ok(file) => Some(file),
503503
Err(err) => {
@@ -566,7 +566,7 @@ fn empty_file_section<'input, 'arena, Endian: gimli::Endianity>(
566566
let reader = gimli::EndianSlice::new(&[], endian);
567567
let section = reader;
568568
let relocations = RelocationMap::default();
569-
let relocations = (*arena_relocations.alloc(relocations)).borrow();
569+
let relocations = &*arena_relocations.alloc(relocations);
570570
Relocate {
571571
relocations,
572572
section,
@@ -605,7 +605,7 @@ fn load_file_section<'input, 'arena, Endian: gimli::Endianity>(
605605
let data_ref = (*arena_data.alloc(data)).borrow();
606606
let reader = gimli::EndianSlice::new(data_ref, endian);
607607
let section = reader;
608-
let relocations = (*arena_relocations.alloc(relocations)).borrow();
608+
let relocations = &*arena_relocations.alloc(relocations);
609609
Ok(Relocate {
610610
relocations,
611611
section,

0 commit comments

Comments
 (0)