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 {
3434 #[ cfg( feature = "bzip2" ) ]
3535 BzTar ,
3636 #[ cfg( feature = "xz" ) ]
37- LzTar ,
38- #[ cfg( feature = "xz" ) ]
3937 XzTar ,
4038}
4139
@@ -69,9 +67,7 @@ impl FromStr for SDistType {
6967 #[ cfg( feature = "bzip2" ) ]
7068 "bz2" | "tbz" => SDistType :: BzTar ,
7169 #[ 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 ,
7571 _ => return Err ( Error :: UnknownDistributionType ) ,
7672 } ;
7773 Ok ( dist_type)
@@ -166,14 +162,10 @@ impl Distribution {
166162 Self :: parse_tar ( BzDecoder :: new ( BufReader :: new ( fs_err:: File :: open ( path) ?) ) )
167163 }
168164 #[ cfg( feature = "xz" ) ]
169- SDistType :: LzTar => Self :: parse_tar ( XzDecoder :: new_stream (
165+ SDistType :: XzTar => Self :: parse_tar ( XzDecoder :: new_stream (
170166 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 ( ) ,
172168 ) ) ,
173- #[ cfg( feature = "xz" ) ]
174- SDistType :: XzTar => {
175- Self :: parse_tar ( XzDecoder :: new ( BufReader :: new ( fs_err:: File :: open ( path) ?) ) )
176- }
177169 }
178170 }
179171
You can’t perform that action at this time.
0 commit comments