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/util/hg.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/util/hg.rs') diff --git a/crates/shirabe/src/util/hg.rs b/crates/shirabe/src/util/hg.rs index cdfcd4e..56e5044 100644 --- a/crates/shirabe/src/util/hg.rs +++ b/crates/shirabe/src/util/hg.rs @@ -5,7 +5,6 @@ use crate::io::IOInterface; use crate::io::IOInterfaceImmutable; use crate::util::ProcessExecutor; use crate::util::Url; -use anyhow::Result; use shirabe_external_packages::composer::pcre::Preg; use shirabe_php_shim::rawurlencode; use std::sync::OnceLock; @@ -37,7 +36,7 @@ impl Hg { command_callable: impl Fn(String) -> Vec, url: String, cwd: Option, - ) -> Result<()> { + ) -> anyhow::Result<()> { self.config.borrow_mut().prohibit_url_by_config( &url, Some(self.io.clone()), @@ -126,7 +125,7 @@ impl Hg { self.throw_exception(&format!("Failed to clone {}, \n\n{}", url, error), &url) } - fn throw_exception(&self, message: &str, url: &str) -> Result<()> { + fn throw_exception(&self, message: &str, url: &str) -> anyhow::Result<()> { if Self::get_version(&self.process).is_none() { anyhow::bail!( "{}", -- cgit v1.3.1