From 4767916166f8ad1d1421f4a45ed67e3a29e8e88f Mon Sep 17 00:00:00 2001 From: Awiteb Date: Mon, 12 Aug 2024 21:06:32 +0000 Subject: [PATCH] chore!: Rename `simple_generator` feature to `simple-generator` Signed-off-by: Awiteb --- .forgejo/workflows/ci.yml | 2 +- Cargo.toml | 4 ++-- Justfile | 2 +- src/captcha_gen/mod.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 31ab8c4..b8e2e83 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Build the source code run: cargo build - name: Build examples - run: cargo build -F 'cacache-storage' --example simple_login + run: cargo build -F 'simple-generator' --example simple_login - name: Run tests run: cargo test --tests --all-features - name: Check the code format diff --git a/Cargo.toml b/Cargo.toml index ed41649..1b50865 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ either = { version = "1.13.0", default-features = false } [features] cacache-storage = ["dep:cacache"] -simple_generator = ["dep:captcha"] +simple-generator = ["dep:captcha"] [dev-dependencies] tempfile = "3.9" @@ -35,4 +35,4 @@ rstest = "0.22.0" [[example]] name = "simple_login" -required-features = ["simple_generator"] +required-features = ["simple-generator"] diff --git a/Justfile b/Justfile index 23a0727..8a6ecbc 100644 --- a/Justfile +++ b/Justfile @@ -19,7 +19,7 @@ _default: # Run the CI (Local use only) @ci: cargo fmt --all --check - cargo build -F 'simple_generator' --example simple_login + cargo build -F 'simple-generator' --example simple_login cargo clippy --workspace --all-targets --examples --tests --all-features -- -D warnings cargo nextest run --workspace --all-targets --all-features @{{JUST_EXECUTABLE}} msrv diff --git a/src/captcha_gen/mod.rs b/src/captcha_gen/mod.rs index 7241ace..7038f1b 100644 --- a/src/captcha_gen/mod.rs +++ b/src/captcha_gen/mod.rs @@ -9,10 +9,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#[cfg(feature = "simple_generator")] +#[cfg(feature = "simple-generator")] mod simple_generator; -#[cfg(feature = "simple_generator")] +#[cfg(feature = "simple-generator")] pub use simple_generator::*; /// Captcha generator, used to generate a new captcha image and answer.