@@ -5,7 +5,7 @@ use fallible_iterator::FallibleIterator;
5
5
use gimli:: { Section , UnitHeader , UnitOffset , UnitSectionOffset , UnitType , UnwindSection } ;
6
6
use object:: { Object , ObjectSection , ObjectSymbol } ;
7
7
use regex:: bytes:: Regex ;
8
- use std:: borrow:: { Borrow , Cow } ;
8
+ use std:: borrow:: Cow ;
9
9
use std:: cmp:: min;
10
10
use std:: collections:: HashMap ;
11
11
use std:: env;
@@ -497,7 +497,7 @@ fn main() {
497
497
process:: exit ( 1 ) ;
498
498
}
499
499
} ;
500
- let mmap_ref = ( * arena_mmap. alloc ( mmap) ) . borrow ( ) ;
500
+ let mmap_ref = arena_mmap. alloc ( mmap) ;
501
501
match object:: File :: parse ( & * * mmap_ref) {
502
502
Ok ( file) => Some ( file) ,
503
503
Err ( err) => {
@@ -566,7 +566,7 @@ fn empty_file_section<'input, 'arena, Endian: gimli::Endianity>(
566
566
let reader = gimli:: EndianSlice :: new ( & [ ] , endian) ;
567
567
let section = reader;
568
568
let relocations = RelocationMap :: default ( ) ;
569
- let relocations = ( * arena_relocations. alloc ( relocations) ) . borrow ( ) ;
569
+ let relocations = arena_relocations. alloc ( relocations) ;
570
570
Relocate {
571
571
relocations,
572
572
section,
@@ -602,10 +602,10 @@ fn load_file_section<'input, 'arena, Endian: gimli::Endianity>(
602
602
// Use a non-zero capacity so that `ReaderOffsetId`s are unique.
603
603
None => Cow :: Owned ( Vec :: with_capacity ( 1 ) ) ,
604
604
} ;
605
- let data_ref = ( * arena_data. alloc ( data) ) . borrow ( ) ;
605
+ let data_ref = arena_data. alloc ( data) ;
606
606
let reader = gimli:: EndianSlice :: new ( data_ref, endian) ;
607
607
let section = reader;
608
- let relocations = ( * arena_relocations. alloc ( relocations) ) . borrow ( ) ;
608
+ let relocations = arena_relocations. alloc ( relocations) ;
609
609
Ok ( Relocate {
610
610
relocations,
611
611
section,
0 commit comments