From 486cfa1ed2508ed2e4302ba6f1083333c3c537bd Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Fri, 9 Aug 2024 12:53:16 +0200 Subject: [PATCH] Fix deps --- .github/workflows/ci.yaml | 2 +- Cargo.toml | 3 ++- src/lib.rs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a195f70..a622c7d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,7 +41,7 @@ jobs: - name: Tests run: cargo test --all-features - name: List bundled examples - run: cargo run --features=build-binary list-examples + run: cargo run list-examples publish: needs: [ build ] if: "startsWith(github.ref, 'refs/tags/v')" diff --git a/Cargo.toml b/Cargo.toml index d8ac28c..666386e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,8 @@ copy_dir = "0.1.3" dir-diff = "0.3.3" [features] -build-binary = ["clap"] +default = ["cli"] +cli = ["dep:clap"] [lib] path = "src/lib.rs" diff --git a/src/lib.rs b/src/lib.rs index fc531c4..53097f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ use std::io::Write; use std::path::{Path, PathBuf}; use std::{fs, io}; +#[cfg(feature = "cli")] pub mod cli; pub mod model;