aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-25 16:16:33 +0900
committernsfisis <nsfisis@gmail.com>2026-07-25 16:17:10 +0900
commit432472808051cb4f1bb9517b858dbc810aaa5a63 (patch)
tree4c58b97942853ea2c3f58368203fa93187746cf8 /crates/shirabe/src/installer.rs
parentd4608662f28b9a5135986b1702afe3199957eabe (diff)
downloadphp-shirabe-432472808051cb4f1bb9517b858dbc810aaa5a63.tar.gz
php-shirabe-432472808051cb4f1bb9517b858dbc810aaa5a63.tar.zst
php-shirabe-432472808051cb4f1bb9517b858dbc810aaa5a63.zip
refactor: replace redundant clones with moves
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/installer.rs')
-rw-r--r--crates/shirabe/src/installer.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/shirabe/src/installer.rs b/crates/shirabe/src/installer.rs
index 883ee134..93bee0bf 100644
--- a/crates/shirabe/src/installer.rs
+++ b/crates/shirabe/src/installer.rs
@@ -173,7 +173,7 @@ impl Installer {
io,
config,
package: package.clone(),
- fixed_root_package: package.clone(),
+ fixed_root_package: package,
download_manager,
repository_manager,
locker,
@@ -1338,8 +1338,8 @@ impl Installer {
let requires: IndexMap<String, AnyConstraint>;
if for_update {
- minimum_stability = self.package.get_minimum_stability().to_string();
- stability_flags = self.package.get_stability_flags().clone();
+ minimum_stability = self.package.get_minimum_stability();
+ stability_flags = self.package.get_stability_flags();
// Convert Link map merge into ConstraintInterface map for use later
let mut req_links: IndexMap<String, Link> = IndexMap::new();
@@ -1392,8 +1392,7 @@ impl Installer {
constraint = filter
.filter_constraint(&req, constraint, false)
.unwrap_or_else(|_| {
- SimpleConstraint::new("=".to_string(), String::new().to_string(), None)
- .into()
+ SimpleConstraint::new("=".to_string(), String::new(), None).into()
});
}
root_requires.insert(req, constraint);
@@ -1422,7 +1421,7 @@ impl Installer {
&minimum_stability,
stability_flags,
root_aliases_input,
- self.package.get_references().clone(),
+ self.package.get_references(),
root_requires,
self.temporary_constraints.clone(),
);