diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-19 21:46:01 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-19 21:46:08 +0900 |
| commit | 5e31fa33c3b5cf726a57a063b8e7a070869250fe (patch) | |
| tree | 98522466966fa7df483cad174ab5fc03db39bc09 /crates/shirabe/src/repository/repository_interface.rs | |
| parent | c839244d8d09f3036ebfee8eef7eb6b147e593ab (diff) | |
| download | php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.gz php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.zst php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.zip | |
fix(compile): fix more random compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository/repository_interface.rs')
| -rw-r--r-- | crates/shirabe/src/repository/repository_interface.rs | 13 |
1 files changed, 11 insertions, 2 deletions
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<dyn ConstraintInterface>), } +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<String>, pub packages: Vec<Box<dyn BasePackage>>, @@ -44,13 +53,13 @@ pub trait RepositoryInterface: Countable + std::fmt::Debug { fn find_package( &self, - name: String, + name: &str, constraint: FindPackageConstraint, ) -> Option<Box<dyn BasePackage>>; fn find_packages( &self, - name: String, + name: &str, constraint: Option<FindPackageConstraint>, ) -> Vec<Box<dyn BasePackage>>; |
