aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer/metapackage_installer.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-29 00:03:00 +0900
committernsfisis <nsfisis@gmail.com>2026-06-29 00:03:00 +0900
commit9be0f98f71fe8071ab839ac1036b4064ac3172b4 (patch)
tree66a2f4feba752f4761c40449e0827ad74fc9b02c /crates/shirabe/src/installer/metapackage_installer.rs
parenta84d531548efa678d4021cea891826e59f8fb462 (diff)
downloadphp-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.tar.gz
php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.tar.zst
php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.zip
chore(lint): ban bare `use anyhow::Result` and fully qualify it
Add a no_banned_use linter that forbids importing anyhow::Result, and update all call sites to reference it via its fully-qualified path so it is never confused with std::result::Result. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/installer/metapackage_installer.rs')
-rw-r--r--crates/shirabe/src/installer/metapackage_installer.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/shirabe/src/installer/metapackage_installer.rs b/crates/shirabe/src/installer/metapackage_installer.rs
index cebec2c..ae1f49b 100644
--- a/crates/shirabe/src/installer/metapackage_installer.rs
+++ b/crates/shirabe/src/installer/metapackage_installer.rs
@@ -9,7 +9,6 @@ use crate::io::IOInterfaceImmutable;
use crate::io::io_interface;
use crate::package::PackageInterfaceHandle;
use crate::repository::InstalledRepositoryInterface;
-use anyhow::Result;
use shirabe_php_shim::{InvalidArgumentException, PhpMixed};
#[derive(Debug)]
@@ -41,7 +40,7 @@ impl InstallerInterface for MetapackageInstaller {
&mut self,
_package: PackageInterfaceHandle,
_prev_package: Option<PackageInterfaceHandle>,
- ) -> Result<Option<PhpMixed>> {
+ ) -> anyhow::Result<Option<PhpMixed>> {
Ok(None)
}
@@ -50,7 +49,7 @@ impl InstallerInterface for MetapackageInstaller {
_type: &str,
_package: PackageInterfaceHandle,
_prev_package: Option<PackageInterfaceHandle>,
- ) -> Result<Option<PhpMixed>> {
+ ) -> anyhow::Result<Option<PhpMixed>> {
Ok(None)
}
@@ -59,7 +58,7 @@ impl InstallerInterface for MetapackageInstaller {
_type: &str,
_package: PackageInterfaceHandle,
_prev_package: Option<PackageInterfaceHandle>,
- ) -> Result<Option<PhpMixed>> {
+ ) -> anyhow::Result<Option<PhpMixed>> {
Ok(None)
}
@@ -67,7 +66,7 @@ impl InstallerInterface for MetapackageInstaller {
&mut self,
repo: &mut dyn InstalledRepositoryInterface,
package: PackageInterfaceHandle,
- ) -> Result<Option<PhpMixed>> {
+ ) -> anyhow::Result<Option<PhpMixed>> {
self.io.write_error3(
&format!(" - {}", InstallOperation::format(package.clone(), false)),
true,
@@ -84,7 +83,7 @@ impl InstallerInterface for MetapackageInstaller {
repo: &mut dyn InstalledRepositoryInterface,
initial: PackageInterfaceHandle,
target: PackageInterfaceHandle,
- ) -> Result<Option<PhpMixed>> {
+ ) -> anyhow::Result<Option<PhpMixed>> {
if !repo.has_package(initial.clone()) {
return Err(InvalidArgumentException {
message: format!("Package is not installed: {}", initial),
@@ -112,7 +111,7 @@ impl InstallerInterface for MetapackageInstaller {
&mut self,
repo: &mut dyn InstalledRepositoryInterface,
package: PackageInterfaceHandle,
- ) -> Result<Option<PhpMixed>> {
+ ) -> anyhow::Result<Option<PhpMixed>> {
if !repo.has_package(package.clone()) {
return Err(InvalidArgumentException {
message: format!("Package is not installed: {}", package),