Skip to content

Commit

Permalink
Add Default derivation to NonDeterminism
Browse files Browse the repository at this point in the history
We invoking the VM we often need an empty non-deterministic input, so a
convenience function for this would be nice. As `NonDeterminism`
only consists of fields that implement `Default`, `Default` extends
naturally to `NonDeterminism`.
  • Loading branch information
Sword-Smith committed Sep 22, 2023
1 parent 3331a8d commit 954e23e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion triton-vm/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl PublicInput {
/// All sources of non-determinism for a program. This includes elements that can be read using
/// instruction `divine`, digests that can be read using instruction `divine_sibling`,
/// and a initial state of random-access memory.
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct NonDeterminism<E>
where
E: Into<BFieldElement> + Eq + Hash,
Expand Down

0 comments on commit 954e23e

Please sign in to comment.