From e583112899cbea7494ffdd73d7de380dd5f808c4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 10 Jun 2026 00:54:22 +0900 Subject: feat(phase-c): resolve exception-handling phase-b TODOs * Catch specific exception types instead of broad/placeholder handling. * Drop the shim Countable trait. --- crates/shirabe/src/repository/installed_array_repository.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/shirabe/src/repository/installed_array_repository.rs') diff --git a/crates/shirabe/src/repository/installed_array_repository.rs b/crates/shirabe/src/repository/installed_array_repository.rs index 64098e9..487a6da 100644 --- a/crates/shirabe/src/repository/installed_array_repository.rs +++ b/crates/shirabe/src/repository/installed_array_repository.rs @@ -1,7 +1,6 @@ //! ref: composer/src/Composer/Repository/InstalledArrayRepository.php use indexmap::IndexMap; -use shirabe_php_shim::Countable; use shirabe_semver::constraint::AnyConstraint; use crate::package::BasePackageHandle; @@ -41,7 +40,10 @@ impl InstalledRepositoryInterface for InstalledArrayRepository { } fn is_fresh(&self) -> bool { - self.inner.count() == 0 + self.inner + .count() + .expect("WritableArrayRepository::count is infallible") + == 0 } } @@ -87,13 +89,11 @@ impl WritableRepositoryInterface for InstalledArrayRepository { } } -impl Countable for InstalledArrayRepository { - fn count(&self) -> i64 { +impl RepositoryInterface for InstalledArrayRepository { + fn count(&self) -> anyhow::Result { todo!() } -} -impl RepositoryInterface for InstalledArrayRepository { fn has_package(&self, _package: PackageInterfaceHandle) -> bool { todo!() } -- cgit v1.3.1