File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ pub struct ArArchiveBuilder<'a> {
3232}
3333
3434impl < ' a > ArchiveBuilder < ' a > for ArArchiveBuilder < ' a > {
35- fn new ( sess : & ' a Session , output : & Path , input : Option < & Path > ) -> Self {
35+ fn new ( sess : & ' a Session , output : & Path ) -> Self {
3636 let config = ArchiveConfig {
3737 sess,
3838 dst : output. to_path_buf ( ) ,
@@ -41,32 +41,10 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
4141 use_gnu_style_archive : sess. target . options . archive_format == "gnu" ,
4242 } ;
4343
44- let ( src_archives, entries) = if let Some ( input) = input {
45- let mut archive = ar:: Archive :: new ( File :: open ( input) . unwrap ( ) ) ;
46- let mut entries = Vec :: new ( ) ;
47-
48- let mut i = 0 ;
49- while let Some ( entry) = archive. next_entry ( ) {
50- let entry = entry. unwrap ( ) ;
51- entries. push ( (
52- String :: from_utf8 ( entry. header ( ) . identifier ( ) . to_vec ( ) ) . unwrap ( ) ,
53- ArchiveEntry :: FromArchive {
54- archive_index : 0 ,
55- entry_index : i,
56- } ,
57- ) ) ;
58- i += 1 ;
59- }
60-
61- ( vec ! [ ( input. to_owned( ) , archive) ] , entries)
62- } else {
63- ( vec ! [ ] , Vec :: new ( ) )
64- } ;
65-
6644 ArArchiveBuilder {
6745 config,
68- src_archives,
69- entries,
46+ src_archives : vec ! [ ] ,
47+ entries : vec ! [ ] ,
7048 }
7149 }
7250
You can’t perform that action at this time.
0 commit comments