From 432472808051cb4f1bb9517b858dbc810aaa5a63 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 25 Jul 2026 16:16:33 +0900 Subject: refactor: replace redundant clones with moves Co-Authored-By: Claude Opus 5 --- crates/shirabe/src/installer.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'crates/shirabe/src/installer.rs') 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; 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 = 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(), ); -- cgit v1.3.1