Skip to content

Commit

Permalink
Fix feature build.
Browse files Browse the repository at this point in the history
  • Loading branch information
schungx committed Aug 4, 2023
1 parent 32c995e commit 39260da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: check
args: "--features bin-features"
args: "--features decimal,metadata,serde,debugging"

# typical build with various feature combinations
build:
Expand Down
8 changes: 6 additions & 2 deletions src/ast/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ impl fmt::Debug for FnCallHashes {
#[cold]
#[inline(never)]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.script {
#[cfg(not(feature = "no_function"))]
return match self.script {
Some(script) if script == self.native => fmt::Debug::fmt(&self.native, f),
Some(script) => write!(f, "({script}, {})", self.native),
None => write!(f, "{} (native only)", self.native),
}
};

#[cfg(feature = "no_function")]
return write!(f, "{}", self.native);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/types/fn_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ impl FnPtr {
args.extend(arg_values.iter_mut());

// Linked to scripted function?
#[cfg(not(feature = "no_function"))]
match self.fn_def {
Some(ref fn_def) if fn_def.params.len() == args.len() => {
let global = &mut context.global_runtime_state().clone();
Expand Down

0 comments on commit 39260da

Please sign in to comment.