aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/dependency_resolver/operation/operation_interface.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-06 15:36:28 +0900
committernsfisis <nsfisis@gmail.com>2026-06-06 15:36:28 +0900
commit44e82cc7d937d49593c6f436d03a38f3371b6873 (patch)
tree227a7aac9d6b39c92108ffb78c0945cb7737d27c /crates/shirabe/src/dependency_resolver/operation/operation_interface.rs
parent165b77b169fbb13a984b6d80f610e3aaa33334e6 (diff)
downloadphp-shirabe-44e82cc7d937d49593c6f436d03a38f3371b6873.tar.gz
php-shirabe-44e82cc7d937d49593c6f436d03a38f3371b6873.tar.zst
php-shirabe-44e82cc7d937d49593c6f436d03a38f3371b6873.zip
refactor(operation,link): port __toString to Display
Move __toString ports to std::fmt::Display: convert Link's inherent to_string() and make OperationInterface require Display instead of a to_string() method, with each operation implementing Display. Also fix the operation __toString output to use show(false), matching SolverOperation::__toString() (was show(true)). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/dependency_resolver/operation/operation_interface.rs')
-rw-r--r--crates/shirabe/src/dependency_resolver/operation/operation_interface.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/shirabe/src/dependency_resolver/operation/operation_interface.rs b/crates/shirabe/src/dependency_resolver/operation/operation_interface.rs
index 51b150c..30ed8eb 100644
--- a/crates/shirabe/src/dependency_resolver/operation/operation_interface.rs
+++ b/crates/shirabe/src/dependency_resolver/operation/operation_interface.rs
@@ -4,15 +4,13 @@ use crate::dependency_resolver::operation::InstallOperation;
use crate::dependency_resolver::operation::UninstallOperation;
use crate::dependency_resolver::operation::UpdateOperation;
-pub trait OperationInterface: std::fmt::Debug {
+pub trait OperationInterface: std::fmt::Display + std::fmt::Debug {
fn as_any(&self) -> &dyn std::any::Any;
fn get_operation_type(&self) -> String;
fn show(&self, lock: bool) -> String;
- fn to_string(&self) -> String;
-
fn as_install_operation(&self) -> Option<&InstallOperation> {
None
}