diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 05c70f1..2fdd333 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,8 +18,12 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Format run: cargo fmt --all -- --check - - name: Build + - name: Build minimal + run: cargo build --verbose --no-default-features + - name: Build with default features run: cargo build --verbose + - name: Build with all features + run: cargo build --verbose --all-features - name: Clippy run: cargo clippy --all-features --all-targets -- -D warnings - name: Run tests diff --git a/interpreter/src/context.rs b/interpreter/src/context.rs index 01034f8..47a71b8 100644 --- a/interpreter/src/context.rs +++ b/interpreter/src/context.rs @@ -186,7 +186,8 @@ impl<'a> Default for Context<'a> { #[cfg(feature = "regex")] ctx.add_function("matches", functions::matches); - if cfg!(feature = "chrono") { + #[cfg(feature = "chrono")] + { ctx.add_function("duration", functions::time::duration); ctx.add_function("timestamp", functions::time::timestamp); ctx.add_function("getFullYear", functions::time::timestamp_year);