Skip to content

Commit 877e455

Browse files
committed
Fixes
1 parent 96e1845 commit 877e455

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/elf/parser.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::fmt::Formatter;
77
use std::fmt::Result as FmtResult;
88
use std::fs::File;
99
use std::io;
10+
#[cfg(feature = "xz")]
1011
use std::io::Read as _;
1112
use std::io::Seek as _;
1213
use std::io::SeekFrom;
@@ -285,13 +286,6 @@ fn decompress_xz(data: &[u8]) -> Result<Vec<u8>> {
285286
Ok(decompressed)
286287
}
287288

288-
#[cfg(not(feature = "xz"))]
289-
fn decompress_xz(_data: &[u8]) -> Result<Vec<u8>> {
290-
Err(Error::with_unsupported(
291-
"ELF section is xz compressed but xz compression support is not enabled",
292-
))
293-
}
294-
295289

296290
#[derive(Debug)]
297291
struct EhdrExt<'elf> {

0 commit comments

Comments
 (0)