From fdc5e94fa85378755c6b8ac63abeb9389541bb33 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jun 2026 04:40:40 +0900 Subject: feat(console): implement StringInput stringification in global proxy StringInput inherits __toString from ArgvInput in PHP; mirror that with a Display impl delegating to its inner ArgvInput, and use it in GlobalCommand::input_to_string. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/global_command.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/shirabe') diff --git a/crates/shirabe/src/command/global_command.rs b/crates/shirabe/src/command/global_command.rs index 5769ebb..27331a7 100644 --- a/crates/shirabe/src/command/global_command.rs +++ b/crates/shirabe/src/command/global_command.rs @@ -53,10 +53,8 @@ impl GlobalCommand { Ok(argv_input.to_string()) } else if let Some(array_input) = input_any.downcast_ref::() { Ok(array_input.to_string()) - } else if input_any.is::() { - // StringInput's stringification is not exposed by shirabe-external-packages - // (its inner ArgvInput is pub(crate) and it defines no public __toString). - todo!("StringInput::__toString is not accessible from the shirabe crate") + } else if let Some(string_input) = input_any.downcast_ref::() { + Ok(string_input.to_string()) } else { Err(LogicException { message: "Expected an Input instance that is stringable".to_string(), -- cgit v1.3.1