From cb2adb32c90b4150c96518ec5be152be70bcb792 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 16:26:19 +0900 Subject: fix(compile): fix IOInterface method signature mismatches - Change write/write_error/write_raw/write_error_raw/overwrite/ overwrite_error/ask/ask_confirmation/ask_and_validate/ ask_and_hide_answer/select to &mut self in trait and NullIO - Change ask-family question params from PhpMixed to String in ConsoleIO, converting to PhpMixed::String internally - Change ConsoleIO::select choices param from PhpMixed to Vec - Fix NullIO::load_configuration to use &mut Config and return Result --- crates/shirabe/src/io/io_interface.rs | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'crates/shirabe/src/io/io_interface.rs') diff --git a/crates/shirabe/src/io/io_interface.rs b/crates/shirabe/src/io/io_interface.rs index 406a3ff..3826bb3 100644 --- a/crates/shirabe/src/io/io_interface.rs +++ b/crates/shirabe/src/io/io_interface.rs @@ -22,34 +22,40 @@ pub trait IOInterface: LoggerInterface { fn is_decorated(&self) -> bool; - fn write(&self, messages: PhpMixed, newline: bool, verbosity: i64); + fn write(&mut self, messages: PhpMixed, newline: bool, verbosity: i64); - fn write_error(&self, messages: PhpMixed, newline: bool, verbosity: i64); + fn write_error(&mut self, messages: PhpMixed, newline: bool, verbosity: i64); - fn write_raw(&self, messages: PhpMixed, newline: bool, verbosity: i64); + fn write_raw(&mut self, messages: PhpMixed, newline: bool, verbosity: i64); - fn write_error_raw(&self, messages: PhpMixed, newline: bool, verbosity: i64); + fn write_error_raw(&mut self, messages: PhpMixed, newline: bool, verbosity: i64); - fn overwrite(&self, messages: PhpMixed, newline: bool, size: Option, verbosity: i64); + fn overwrite(&mut self, messages: PhpMixed, newline: bool, size: Option, verbosity: i64); - fn overwrite_error(&self, messages: PhpMixed, newline: bool, size: Option, verbosity: i64); + fn overwrite_error( + &mut self, + messages: PhpMixed, + newline: bool, + size: Option, + verbosity: i64, + ); - fn ask(&self, question: String, default: PhpMixed) -> PhpMixed; + fn ask(&mut self, question: String, default: PhpMixed) -> PhpMixed; - fn ask_confirmation(&self, question: String, default: bool) -> bool; + fn ask_confirmation(&mut self, question: String, default: bool) -> bool; fn ask_and_validate( - &self, + &mut self, question: String, validator: Box PhpMixed>, attempts: Option, default: PhpMixed, ) -> PhpMixed; - fn ask_and_hide_answer(&self, question: String) -> Option; + fn ask_and_hide_answer(&mut self, question: String) -> Option; fn select( - &self, + &mut self, question: String, choices: Vec, default: PhpMixed, -- cgit v1.3.1