Skip to content

Commit 3b6a935

Browse files
tamirdb1llow
authored andcommitted
Fix double reference warnings
See rust-lang/rust#110955.
1 parent 4f0493a commit 3b6a935

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/dwarfdump.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use gimli::{
88
};
99
use object::{Object, ObjectSection, ObjectSymbol};
1010
use regex::bytes::Regex;
11-
use std::borrow::{Borrow, Cow};
11+
use std::borrow::Cow;
1212
use std::cmp::min;
1313
use std::collections::HashMap;
1414
use std::env;
@@ -501,7 +501,7 @@ fn main() {
501501
process::exit(1);
502502
}
503503
};
504-
let mmap_ref = (*arena_mmap.alloc(mmap)).borrow();
504+
let mmap_ref = arena_mmap.alloc(mmap);
505505
match object::File::parse(&**mmap_ref) {
506506
Ok(file) => Some(file),
507507
Err(err) => {
@@ -570,7 +570,7 @@ fn empty_file_section<'input, 'arena, Endian: gimli::Endianity>(
570570
let reader = gimli::EndianSlice::new(&[], endian);
571571
let section = reader;
572572
let relocations = RelocationMap::default();
573-
let relocations = (*arena_relocations.alloc(relocations)).borrow();
573+
let relocations = arena_relocations.alloc(relocations);
574574
Relocate {
575575
relocations,
576576
section,
@@ -606,10 +606,10 @@ fn load_file_section<'input, 'arena, Endian: gimli::Endianity>(
606606
// Use a non-zero capacity so that `ReaderOffsetId`s are unique.
607607
None => Cow::Owned(Vec::with_capacity(1)),
608608
};
609-
let data_ref = (*arena_data.alloc(data)).borrow();
609+
let data_ref = arena_data.alloc(data);
610610
let reader = gimli::EndianSlice::new(data_ref, endian);
611611
let section = reader;
612-
let relocations = (*arena_relocations.alloc(relocations)).borrow();
612+
let relocations = arena_relocations.alloc(relocations);
613613
Ok(Relocate {
614614
relocations,
615615
section,

0 commit comments

Comments
 (0)