Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation without chrono #111

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
clarkmcc marked this conversation as resolved.
Show resolved Hide resolved
- name: Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Run tests
Expand Down
3 changes: 2 additions & 1 deletion interpreter/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down