From 7a4123df47d7afc1aeee261ea333dd3e5c48dd1a Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Sun, 3 Dec 2023 22:34:24 +0800 Subject: [PATCH 1/2] Tidy up features --- .github/workflows/build-and-test.yml | 4 ++-- Cargo.toml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d7a24c009..4a9c955f6 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -61,7 +61,7 @@ jobs: uses: actions/checkout@v4 - name: Install cross (non-x86_64 linux) - if: "matrix.target != 'x86_64-unknown-linux-gnu' && runner.os == 'Linux'" + if: matrix.target != 'x86_64-unknown-linux-gnu' && runner.os == 'Linux' run: | pushd "$(mktemp -d)" wget https://github.com/cross-rs/cross/releases/download/v0.2.4/cross-x86_64-unknown-linux-musl.tar.gz @@ -73,7 +73,7 @@ jobs: - name: Set up extra cargo flags if: matrix.no-zstd-thin run: | - echo "EXTRA_CARGO_FLAGS=--no-default-features --features flate2/zlib,zip/deflate-zlib" >> $GITHUB_ENV + echo "EXTRA_CARGO_FLAGS=--no-default-features --features use_zlib" >> $GITHUB_ENV - name: Install Rust run: | diff --git a/Cargo.toml b/Cargo.toml index 1fd37e471..a190e37fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,9 @@ rand = { version = "0.8.5", default-features = false, features = ["small_rng", " test-strategy = "0.3.1" [features] -default = ["flate2/zlib", "gzp/deflate_zlib", "zip/deflate-zlib", "zstd/thin"] +default = ["use_zlib", "use_zstd_thin"] +use_zlib = ["flate2/zlib", "gzp/deflate_zlib", "zip/deflate-zlib"] +use_zstd_thin = ["zstd/thin"] [profile.release] lto = true From ee3d3c873884665aff20b815c05c8b03e4151b27 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Sun, 3 Dec 2023 22:46:32 +0800 Subject: [PATCH 2/2] Write changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b35597050..dedeb153c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ Categories Used: ### Improvements +- Explicitly declare feature flags `use_zlib` & `use_zstd_thin` [\#564](https://github.com/ouch-org/ouch/pull/564) ([cyqsimon](https://github.com/cyqsimon)) + ### Tweaks ## [0.5.0](https://github.com/ouch-org/ouch/compare/0.4.2...0.5.0)