aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/dependency_resolver/operation/install_operation.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-27 00:49:33 +0900
committernsfisis <nsfisis@gmail.com>2026-05-27 00:54:09 +0900
commitcc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (patch)
tree091a0d01232d927f13f3ab22700701804980f231 /crates/shirabe/src/dependency_resolver/operation/install_operation.rs
parentc5850d62beabef0a6bcc4cf6a179589c0ba8f405 (diff)
downloadphp-shirabe-cc5d73c05a0abca2eebcc8a6afa0b1543ee49850.tar.gz
php-shirabe-cc5d73c05a0abca2eebcc8a6afa0b1543ee49850.tar.zst
php-shirabe-cc5d73c05a0abca2eebcc8a6afa0b1543ee49850.zip
refactor(package): pass package handles by value throughout
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/dependency_resolver/operation/install_operation.rs')
-rw-r--r--crates/shirabe/src/dependency_resolver/operation/install_operation.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/dependency_resolver/operation/install_operation.rs b/crates/shirabe/src/dependency_resolver/operation/install_operation.rs
index 466c877..23be038 100644
--- a/crates/shirabe/src/dependency_resolver/operation/install_operation.rs
+++ b/crates/shirabe/src/dependency_resolver/operation/install_operation.rs
@@ -15,11 +15,11 @@ impl InstallOperation {
Self { package }
}
- pub fn get_package(&self) -> &PackageInterfaceHandle {
- &self.package
+ pub fn get_package(&self) -> PackageInterfaceHandle {
+ self.package.clone()
}
- pub fn format(package: &dyn PackageInterface, lock: bool) -> String {
+ pub fn format(package: PackageInterfaceHandle, lock: bool) -> String {
format!(
"{}<info>{}</info> (<comment>{}</comment>)",
if lock { "Locking " } else { "Installing " },
@@ -44,7 +44,7 @@ impl OperationInterface for InstallOperation {
}
fn show(&self, lock: bool) -> String {
- Self::format(self.package.as_rc().borrow().as_package_interface(), lock)
+ Self::format(self.package.clone(), lock)
}
fn to_string(&self) -> String {