forked from ElementsProject/elements-miniscript
-
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.
ForEachKey: clean up Concrete impl, remove Semantic impl
The Concrete impl used a weird complier gitch `let pred = |x| pred(x)` to avoid an infinite recursion bug (which in turn triggered a compiler bug that they didn't fix even though I filed it a DAY AFTER IT WAS INTRODUCED ON NIGHTLY and instead they waited 3 months and released it on stable forcing me to backport a workaround to a gazillion versions of rust-miniscript). The bug was rust-lang/rust#110475 BTW, just to make sure this commit triggers another notification on that issue. Clippy doesn't like this. Clippy is obviously wrong but rather than having this stupid fight again just switch to a different idiom. Meanwhile, the Semantic impl of ForEachKey panics iff any keys are present, regardless of the closure passed to it. This is funny but completely useless and we should just remove it.
- Loading branch information
Showing
2 changed files
with
9 additions
and
26 deletions.
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