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/zip.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/util/zip.rs') diff --git a/crates/shirabe/src/util/zip.rs b/crates/shirabe/src/util/zip.rs index dbb2627..a671d63 100644 --- a/crates/shirabe/src/util/zip.rs +++ b/crates/shirabe/src/util/zip.rs @@ -1,6 +1,5 @@ //! ref: composer/src/Composer/Util/Zip.php -use anyhow::Result; use indexmap::IndexMap; use shirabe_php_shim::{ RuntimeException, ZipArchive, dirname, extension_loaded, implode, stream_get_contents, @@ -9,7 +8,7 @@ use shirabe_php_shim::{ pub struct Zip; impl Zip { - pub fn get_composer_json(path_to_zip: &str) -> Result> { + pub fn get_composer_json(path_to_zip: &str) -> anyhow::Result> { if !extension_loaded("zip") { return Err(RuntimeException { message: "The Zip Util requires PHP's zip extension".to_string(), @@ -43,7 +42,7 @@ impl Zip { Ok(content) } - fn locate_file(zip: &ZipArchive, filename: &str) -> Result { + fn locate_file(zip: &ZipArchive, filename: &str) -> anyhow::Result { // return root composer.json if it is there and is a file if let Some(index) = zip.locate_name(filename) && zip.get_from_index(index).is_some() -- cgit v1.3.1