File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -30,34 +30,16 @@ pub(crate) struct ArArchiveBuilder<'a> {
3030}
3131
3232impl < ' a > ArchiveBuilder < ' a > for ArArchiveBuilder < ' a > {
33- fn new ( sess : & ' a Session , output : & Path , input : Option < & Path > ) -> Self {
34- let ( src_archives, entries) = if let Some ( input) = input {
35- let read_cache = ReadCache :: new ( File :: open ( input) . unwrap ( ) ) ;
36- let archive = ArchiveFile :: parse ( & read_cache) . unwrap ( ) ;
37- let mut entries = Vec :: new ( ) ;
38-
39- for entry in archive. members ( ) {
40- let entry = entry. unwrap ( ) ;
41- entries. push ( (
42- entry. name ( ) . to_vec ( ) ,
43- ArchiveEntry :: FromArchive { archive_index : 0 , file_range : entry. file_range ( ) } ,
44- ) ) ;
45- }
46-
47- ( vec ! [ read_cache. into_inner( ) ] , entries)
48- } else {
49- ( vec ! [ ] , Vec :: new ( ) )
50- } ;
51-
33+ fn new ( sess : & ' a Session , output : & Path ) -> Self {
5234 ArArchiveBuilder {
5335 sess,
5436 dst : output. to_path_buf ( ) ,
5537 use_gnu_style_archive : sess. target . archive_format == "gnu" ,
5638 // FIXME fix builtin ranlib on macOS
5739 no_builtin_ranlib : sess. target . is_like_osx ,
5840
59- src_archives,
60- entries,
41+ src_archives : vec ! [ ] ,
42+ entries : vec ! [ ] ,
6143 }
6244 }
6345
You can’t perform that action at this time.
0 commit comments