diff options
Diffstat (limited to 'crates/shirabe/src/io/io_interface.rs')
| -rw-r--r-- | crates/shirabe/src/io/io_interface.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/io/io_interface.rs b/crates/shirabe/src/io/io_interface.rs index e48f9ce..e33cea2 100644 --- a/crates/shirabe/src/io/io_interface.rs +++ b/crates/shirabe/src/io/io_interface.rs @@ -101,10 +101,10 @@ pub trait IOInterfaceImmutable: std::fmt::Debug { fn ask_and_validate( &self, question: String, - validator: Box<dyn Fn(PhpMixed) -> PhpMixed>, + validator: Box<dyn Fn(PhpMixed) -> anyhow::Result<PhpMixed>>, attempts: Option<i64>, default: PhpMixed, - ) -> PhpMixed; + ) -> anyhow::Result<PhpMixed>; fn ask_and_hide_answer(&self, question: String) -> Option<String>; @@ -279,10 +279,10 @@ impl IOInterfaceImmutable for Rc<RefCell<dyn IOInterface>> { fn ask_and_validate( &self, question: String, - validator: Box<dyn Fn(PhpMixed) -> PhpMixed>, + validator: Box<dyn Fn(PhpMixed) -> anyhow::Result<PhpMixed>>, attempts: Option<i64>, default: PhpMixed, - ) -> PhpMixed { + ) -> anyhow::Result<PhpMixed> { self.borrow() .ask_and_validate(question, validator, attempts, default) } |
