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> {
32
32
}
33
33
34
34
impl < ' 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 {
36
36
let config = ArchiveConfig {
37
37
sess,
38
38
dst : output. to_path_buf ( ) ,
@@ -41,32 +41,10 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
41
41
use_gnu_style_archive : sess. target . options . archive_format == "gnu" ,
42
42
} ;
43
43
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
-
66
44
ArArchiveBuilder {
67
45
config,
68
- src_archives,
69
- entries,
46
+ src_archives : vec ! [ ] ,
47
+ entries : vec ! [ ] ,
70
48
}
71
49
}
72
50
You can’t perform that action at this time.
0 commit comments