From 9be0f98f71fe8071ab839ac1036b4064ac3172b4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jun 2026 00:03:00 +0900 Subject: 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) --- crates/shirabe/src/installer/metapackage_installer.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'crates/shirabe/src/installer/metapackage_installer.rs') 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, - ) -> Result> { + ) -> anyhow::Result> { Ok(None) } @@ -50,7 +49,7 @@ impl InstallerInterface for MetapackageInstaller { _type: &str, _package: PackageInterfaceHandle, _prev_package: Option, - ) -> Result> { + ) -> anyhow::Result> { Ok(None) } @@ -59,7 +58,7 @@ impl InstallerInterface for MetapackageInstaller { _type: &str, _package: PackageInterfaceHandle, _prev_package: Option, - ) -> Result> { + ) -> anyhow::Result> { Ok(None) } @@ -67,7 +66,7 @@ impl InstallerInterface for MetapackageInstaller { &mut self, repo: &mut dyn InstalledRepositoryInterface, package: PackageInterfaceHandle, - ) -> Result> { + ) -> anyhow::Result> { 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> { + ) -> anyhow::Result> { 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> { + ) -> anyhow::Result> { if !repo.has_package(package.clone()) { return Err(InvalidArgumentException { message: format!("Package is not installed: {}", package), -- cgit v1.3.1