From 5e31fa33c3b5cf726a57a063b8e7a070869250fe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 19 May 2026 21:46:01 +0900 Subject: fix(compile): fix more random compile errors Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/shirabe/src/repository/repository_interface.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/repository/repository_interface.rs') diff --git a/crates/shirabe/src/repository/repository_interface.rs b/crates/shirabe/src/repository/repository_interface.rs index 2a9c8f5..6113997 100644 --- a/crates/shirabe/src/repository/repository_interface.rs +++ b/crates/shirabe/src/repository/repository_interface.rs @@ -12,6 +12,15 @@ pub enum FindPackageConstraint { Constraint(Box), } +impl Clone for FindPackageConstraint { + fn clone(&self) -> Self { + match self { + Self::String(s) => Self::String(s.clone()), + Self::Constraint(c) => Self::Constraint(c.clone_box()), + } + } +} + pub struct LoadPackagesResult { pub names_found: Vec, pub packages: Vec>, @@ -44,13 +53,13 @@ pub trait RepositoryInterface: Countable + std::fmt::Debug { fn find_package( &self, - name: String, + name: &str, constraint: FindPackageConstraint, ) -> Option>; fn find_packages( &self, - name: String, + name: &str, constraint: Option, ) -> Vec>; -- cgit v1.3.1