forked from BlockstreamResearch/simfony
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There was no way to assert that an option value is None, so I add is_none which returns true if the value is None. Rust seems to have decided against unwrap_none, so I will not go down that path. rust-lang/rust#62633 assert!(is_none(x)) might produce slightly larger Simplicity expressions than a hypothetical unwrap_none(x), but I will not try to prematurely optimize any Simplicity code here. A future version of the Simfony compiler might detect assert! + is_none and produce an optimized Simplicity expression accordingly.
- Loading branch information
1 parent
7a17bab
commit 9042a14
Showing
5 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters