diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c94a6e8..8ced89c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,6 +31,9 @@ jobs: - name: Run Tests run: cargo test --all-features --verbose + - name: Run Tests (no ssl) + run: cargo test --no-default-features --verbose --lib + - name: Run Audit # RUSTSEC-2021-0145 is criterion so only within benchmarks run: cargo audit -D warnings diff --git a/src/lib.rs b/src/lib.rs index 0050eba..5f46495 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ #![deny(missing_docs)] #![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))] +#[cfg(feature = "online")] use rand::{distributions::Alphanumeric, Rng}; use std::io::Write; use std::path::PathBuf; @@ -104,6 +105,7 @@ impl Cache { self.repo(Repo::new(model_id, RepoType::Space)) } + #[cfg(feature = "online")] pub(crate) fn temp_path(&self) -> PathBuf { let mut path = self.path().clone(); path.push("tmp");