File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ enum SDistType {
34
34
#[ cfg( feature = "bzip2" ) ]
35
35
BzTar ,
36
36
#[ cfg( feature = "xz" ) ]
37
- LzTar ,
38
- #[ cfg( feature = "xz" ) ]
39
37
XzTar ,
40
38
}
41
39
@@ -69,9 +67,7 @@ impl FromStr for SDistType {
69
67
#[ cfg( feature = "bzip2" ) ]
70
68
"bz2" | "tbz" => SDistType :: BzTar ,
71
69
#[ cfg( feature = "xz" ) ]
72
- "lz" | "lzma" | "tlz" => SDistType :: LzTar ,
73
- #[ cfg( feature = "xz" ) ]
74
- "txz" | "xz" => SDistType :: XzTar ,
70
+ "lz" | "lzma" | "tlz" | "txz" | "xz" => SDistType :: XzTar ,
75
71
_ => return Err ( Error :: UnknownDistributionType ) ,
76
72
} ;
77
73
Ok ( dist_type)
@@ -166,14 +162,10 @@ impl Distribution {
166
162
Self :: parse_tar ( BzDecoder :: new ( BufReader :: new ( fs_err:: File :: open ( path) ?) ) )
167
163
}
168
164
#[ cfg( feature = "xz" ) ]
169
- SDistType :: LzTar => Self :: parse_tar ( XzDecoder :: new_stream (
165
+ SDistType :: XzTar => Self :: parse_tar ( XzDecoder :: new_stream (
170
166
BufReader :: new ( fs_err:: File :: open ( path) ?) ,
171
- XzStream :: new_lzma_decoder ( u64:: max_value ( ) ) . unwrap ( ) ,
167
+ XzStream :: new_auto_decoder ( u64:: max_value ( ) , 0 ) . unwrap ( ) ,
172
168
) ) ,
173
- #[ cfg( feature = "xz" ) ]
174
- SDistType :: XzTar => {
175
- Self :: parse_tar ( XzDecoder :: new ( BufReader :: new ( fs_err:: File :: open ( path) ?) ) )
176
- }
177
169
}
178
170
}
179
171
You can’t perform that action at this time.
0 commit comments