Skip to content

Commit

Permalink
fix: update has_public_inputs to account for databus
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Sep 19, 2024
1 parent 142d70c commit 15d2693
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tooling/noirc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ impl Abi {

/// Returns whether any values are needed to be made public for verification.
pub fn has_public_inputs(&self) -> bool {
self.return_type.is_some() || self.parameters.iter().any(|param| param.is_public())
let has_public_args = self.parameters.iter().any(|param| param.is_public());
let has_public_return = self.return_type.as_ref().map_or(false, |typ| matches!(typ.visibility, AbiVisibility::Public));
has_public_args || has_public_return
}

/// Returns `true` if the ABI contains no parameters or return value.
Expand Down

0 comments on commit 15d2693

Please sign in to comment.