-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ahmad-cancun-eip-6780
- Loading branch information
Showing
54 changed files
with
878 additions
and
394 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[target.'cfg(all())'] | ||
rustflags = [ | ||
"-Aclippy::blocks_in_conditions", | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
mod exit; | ||
mod trap; | ||
|
||
pub use self::{exit::*, trap::*}; | ||
|
||
/// Capture represents the result of execution. | ||
#[derive(Clone, Copy, Debug, Eq, PartialEq)] | ||
pub enum Capture<E, T> { | ||
/// The machine has exited. It cannot be executed again. | ||
Exit(E), | ||
/// The machine has trapped. It is waiting for external information, and can | ||
/// be executed again. | ||
Trap(T), | ||
} | ||
|
||
impl<E, T> Capture<E, T> { | ||
pub fn exit(self) -> Option<E> { | ||
match self { | ||
Self::Exit(e) => Some(e), | ||
Self::Trap(_) => None, | ||
} | ||
} | ||
|
||
pub fn trap(self) -> Option<T> { | ||
match self { | ||
Self::Exit(_) => None, | ||
Self::Trap(t) => Some(t), | ||
} | ||
} | ||
} |
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
Oops, something went wrong.