From cd3fe523a35858914c12da5e96d99c706770253d Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Wed, 6 Aug 2025 07:46:51 +0300 Subject: [PATCH] core/types: add IOResult::is_io() helper --- core/types.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/types.rs b/core/types.rs index 8a6d65d76..fb26fd50a 100644 --- a/core/types.rs +++ b/core/types.rs @@ -2466,6 +2466,12 @@ pub enum IOResult { IO, } +impl IOResult { + pub fn is_io(&self) -> bool { + matches!(self, IOResult::IO) + } +} + /// Evaluate a Result>, if IO return IO. #[macro_export] macro_rules! return_if_io {