Skip to content

Commit 04b854e

Browse files
committed
Apply code review suggestions
1 parent a9c03ac commit 04b854e

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.github/workflows/wasi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55

66
jobs:
77
build:
8-
name: cargo +nightly build --lib --features all --target wasm32-wasip1-threads
8+
name: Build for wasm32-wasip1-threads
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ all-algorithms = ["brotli", "bzip2", "deflate", "gzip", "lzma", "xz", "zlib", "z
2525
# algorithms
2626
deflate = ["flate2"]
2727
gzip = ["flate2"]
28-
lzma = ["liblzma"]
29-
xz = ["liblzma"]
28+
lzma = ["dep:liblzma"]
29+
xz = ["lzma"]
30+
xz2 = ["xz"]
3031
zlib = ["flate2"]
3132
zstd = ["libzstd", "zstd-safe"]
3233
zstdmt = ["zstd", "zstd-safe/zstdmt"]

src/codec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod gzip;
1717
mod lzma;
1818
#[cfg(feature = "xz")]
1919
mod xz;
20-
#[cfg(feature = "liblzma")]
20+
#[cfg(feature = "lzma")]
2121
mod xz2;
2222
#[cfg(feature = "zlib")]
2323
mod zlib;
@@ -40,7 +40,7 @@ pub(crate) use self::gzip::{GzipDecoder, GzipEncoder};
4040
pub(crate) use self::lzma::{LzmaDecoder, LzmaEncoder};
4141
#[cfg(feature = "xz")]
4242
pub(crate) use self::xz::{XzDecoder, XzEncoder};
43-
#[cfg(feature = "liblzma")]
43+
#[cfg(feature = "lzma")]
4444
pub(crate) use self::xz2::{Xz2Decoder, Xz2Encoder, Xz2FileFormat};
4545
#[cfg(feature = "zlib")]
4646
pub(crate) use self::zlib::{ZlibDecoder, ZlibEncoder};

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
)]
140140
#![cfg_attr(not(all), allow(unused))]
141141

142-
#[cfg(any(feature = "bzip2", feature = "flate2", feature = "liblzma"))]
142+
#[cfg(any(feature = "bzip2", feature = "flate2", feature = "lzma"))]
143143
use std::convert::TryInto;
144144

145145
#[macro_use]
@@ -242,7 +242,7 @@ impl Level {
242242
}
243243
}
244244

245-
#[cfg(feature = "liblzma")]
245+
#[cfg(feature = "lzma")]
246246
fn into_xz2(self) -> u32 {
247247
match self {
248248
Self::Fastest => 0,

0 commit comments

Comments
 (0)