From ffd3e239a56172d2a336fb4d6253c01f6b1a0100 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 22 Jun 2026 04:38:26 +0900 Subject: refactor(console): introduce ApplicationHandle shared-ownership newtype Collapse the dual Application API (static methods taking `&Rc>` plus `&mut self` bridges via `shared()`) into a single handle type `ApplicationHandle(Rc>)`, mirroring the Composer handle pattern. Methods that invoke command callbacks (add, run, do_run, base_run, base_do_run, do_run_command, add_commands, init) move to `impl ApplicationHandle` with short-scoped borrows; data-only methods and `impl BaseApplication` stay on `Application`. `shared()` now returns the handle, and `new_shared`/`init_shared` fold into `ApplicationHandle::new`/`init`. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/outdated_command.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/shirabe/src/command') diff --git a/crates/shirabe/src/command/outdated_command.rs b/crates/shirabe/src/command/outdated_command.rs index 16a4ac5..3281723 100644 --- a/crates/shirabe/src/command/outdated_command.rs +++ b/crates/shirabe/src/command/outdated_command.rs @@ -227,10 +227,7 @@ impl Command for OutdatedCommand { .shared() }; - Ok( - crate::console::application::Application::run(&application, Some(input), Some(output))? - as i64, - ) + Ok(application.run(Some(input), Some(output))? as i64) } fn initialize( -- cgit v1.3.1