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/silencer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/util/silencer.rs') diff --git a/crates/shirabe/src/util/silencer.rs b/crates/shirabe/src/util/silencer.rs index f5ee64d..7286689 100644 --- a/crates/shirabe/src/util/silencer.rs +++ b/crates/shirabe/src/util/silencer.rs @@ -1,6 +1,5 @@ //! ref: composer/src/Composer/Util/Silencer.php -use anyhow::Result; use shirabe_php_shim::{ E_DEPRECATED, E_NOTICE, E_USER_DEPRECATED, E_USER_NOTICE, E_USER_WARNING, E_WARNING, error_reporting, @@ -36,9 +35,9 @@ impl Silencer { } } - pub fn call(callable: F) -> Result + pub fn call(callable: F) -> anyhow::Result where - F: FnOnce() -> Result, + F: FnOnce() -> anyhow::Result, { Self::suppress(None); match callable() { -- cgit v1.3.1