Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -67,6 +67,22 @@ pub enum Flow { Done, } +impl Flow { + pub fn to_done(self) -> Self { + match self { + Flow::Continue | Flow::Done => Flow::Done, + Flow::Err => Flow::Err, + } + } + + pub fn to_continue(self) -> Self { + match self { + Flow::Continue | Flow::Done => Flow::Continue, + Flow::Err => Flow::Err, + } + } +} + #[macro_export] macro_rules! Walk { { |