File tree 1 file changed +3
-21
lines changed
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> {
30
30
}
31
31
32
32
impl < ' 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 {
52
34
ArArchiveBuilder {
53
35
sess,
54
36
dst : output. to_path_buf ( ) ,
55
37
use_gnu_style_archive : sess. target . archive_format == "gnu" ,
56
38
// FIXME fix builtin ranlib on macOS
57
39
no_builtin_ranlib : sess. target . is_like_osx ,
58
40
59
- src_archives,
60
- entries,
41
+ src_archives : vec ! [ ] ,
42
+ entries : vec ! [ ] ,
61
43
}
62
44
}
63
45
You can’t perform that action at this time.
0 commit comments