@@ -8,7 +8,7 @@ use gimli::{
8
8
} ;
9
9
use object:: { Object , ObjectSection , ObjectSymbol } ;
10
10
use regex:: bytes:: Regex ;
11
- use std:: borrow:: { Borrow , Cow } ;
11
+ use std:: borrow:: Cow ;
12
12
use std:: cmp:: min;
13
13
use std:: collections:: HashMap ;
14
14
use std:: env;
@@ -501,7 +501,7 @@ fn main() {
501
501
process:: exit ( 1 ) ;
502
502
}
503
503
} ;
504
- let mmap_ref = ( * arena_mmap. alloc ( mmap) ) . borrow ( ) ;
504
+ let mmap_ref = arena_mmap. alloc ( mmap) ;
505
505
match object:: File :: parse ( & * * mmap_ref) {
506
506
Ok ( file) => Some ( file) ,
507
507
Err ( err) => {
@@ -570,7 +570,7 @@ fn empty_file_section<'input, 'arena, Endian: gimli::Endianity>(
570
570
let reader = gimli:: EndianSlice :: new ( & [ ] , endian) ;
571
571
let section = reader;
572
572
let relocations = RelocationMap :: default ( ) ;
573
- let relocations = ( * arena_relocations. alloc ( relocations) ) . borrow ( ) ;
573
+ let relocations = arena_relocations. alloc ( relocations) ;
574
574
Relocate {
575
575
relocations,
576
576
section,
@@ -606,10 +606,10 @@ fn load_file_section<'input, 'arena, Endian: gimli::Endianity>(
606
606
// Use a non-zero capacity so that `ReaderOffsetId`s are unique.
607
607
None => Cow :: Owned ( Vec :: with_capacity ( 1 ) ) ,
608
608
} ;
609
- let data_ref = ( * arena_data. alloc ( data) ) . borrow ( ) ;
609
+ let data_ref = arena_data. alloc ( data) ;
610
610
let reader = gimli:: EndianSlice :: new ( data_ref, endian) ;
611
611
let section = reader;
612
- let relocations = ( * arena_relocations. alloc ( relocations) ) . borrow ( ) ;
612
+ let relocations = arena_relocations. alloc ( relocations) ;
613
613
Ok ( Relocate {
614
614
relocations,
615
615
section,
0 commit comments