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/io/buffer_io.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/io/buffer_io.rs') diff --git a/crates/shirabe/src/io/buffer_io.rs b/crates/shirabe/src/io/buffer_io.rs index 5c93d72..af7ae61 100644 --- a/crates/shirabe/src/io/buffer_io.rs +++ b/crates/shirabe/src/io/buffer_io.rs @@ -1,7 +1,6 @@ //! ref: composer/src/Composer/IO/BufferIO.php use crate::io::ConsoleIO; -use anyhow::Result; use shirabe_external_packages::composer::pcre::Preg; use shirabe_external_packages::symfony::console::formatter::OutputFormatterInterface; use shirabe_external_packages::symfony::console::helper::QuestionHelper; @@ -24,7 +23,7 @@ impl BufferIO { input: String, verbosity: i64, formatter: Option>>, - ) -> Result { + ) -> anyhow::Result { let mut input_obj = StringInput::new(&input)?; input_obj.set_interactive(false); @@ -112,7 +111,7 @@ impl BufferIO { output } - pub fn set_user_inputs(&mut self, inputs: Vec) -> Result<()> { + pub fn set_user_inputs(&mut self, inputs: Vec) -> anyhow::Result<()> { let stream = self.create_stream(inputs)?; let mut input = self.inner.input.borrow_mut(); @@ -130,7 +129,7 @@ impl BufferIO { Ok(()) } - fn create_stream(&self, inputs: Vec) -> Result { + fn create_stream(&self, inputs: Vec) -> anyhow::Result { let stream = match fopen("php://memory", "r+") { Ok(stream) => stream, Err(_) => { -- cgit v1.3.1