@@ -5,7 +5,7 @@ use fallible_iterator::FallibleIterator;
55use gimli:: { Section , UnitHeader , UnitOffset , UnitSectionOffset , UnitType , UnwindSection } ;
66use object:: { Object , ObjectSection , ObjectSymbol } ;
77use regex:: bytes:: Regex ;
8- use std:: borrow:: { Borrow , Cow } ;
8+ use std:: borrow:: Cow ;
99use std:: cmp:: min;
1010use std:: collections:: HashMap ;
1111use std:: env;
@@ -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,
@@ -602,10 +602,10 @@ fn load_file_section<'input, 'arena, Endian: gimli::Endianity>(
602602 // Use a non-zero capacity so that `ReaderOffsetId`s are unique.
603603 None => Cow :: Owned ( Vec :: with_capacity ( 1 ) ) ,
604604 } ;
605- let data_ref = ( * arena_data. alloc ( data) ) . borrow ( ) ;
605+ let data_ref = arena_data. alloc ( data) ;
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