aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/installed_array_repository.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 21:46:01 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 21:46:08 +0900
commit5e31fa33c3b5cf726a57a063b8e7a070869250fe (patch)
tree98522466966fa7df483cad174ab5fc03db39bc09 /crates/shirabe/src/repository/installed_array_repository.rs
parentc839244d8d09f3036ebfee8eef7eb6b147e593ab (diff)
downloadphp-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/installed_array_repository.rs')
-rw-r--r--crates/shirabe/src/repository/installed_array_repository.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/crates/shirabe/src/repository/installed_array_repository.rs b/crates/shirabe/src/repository/installed_array_repository.rs
index c30d682..ddcda90 100644
--- a/crates/shirabe/src/repository/installed_array_repository.rs
+++ b/crates/shirabe/src/repository/installed_array_repository.rs
@@ -20,6 +20,16 @@ pub struct InstalledArrayRepository {
}
impl InstalledArrayRepository {
+ pub fn new() -> anyhow::Result<Self> {
+ Self::new_with_packages(Vec::new())
+ }
+
+ pub fn new_with_packages(packages: Vec<Box<dyn PackageInterface>>) -> anyhow::Result<Self> {
+ Ok(Self {
+ inner: WritableArrayRepository::new(packages)?,
+ })
+ }
+
pub fn get_repo_name(&self) -> String {
format!("installed {}", self.inner.get_repo_name())
}
@@ -89,14 +99,14 @@ impl RepositoryInterface for InstalledArrayRepository {
}
fn find_package(
&self,
- _name: String,
+ _name: &str,
_constraint: FindPackageConstraint,
) -> Option<Box<dyn BasePackage>> {
todo!()
}
fn find_packages(
&self,
- _name: String,
+ _name: &str,
_constraint: Option<FindPackageConstraint>,
) -> Vec<Box<dyn BasePackage>> {
todo!()