diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-29 00:03:00 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-29 00:03:00 +0900 |
| commit | 9be0f98f71fe8071ab839ac1036b4064ac3172b4 (patch) | |
| tree | 66a2f4feba752f4761c40449e0827ad74fc9b02c /crates/shirabe/src/io/buffer_io.rs | |
| parent | a84d531548efa678d4021cea891826e59f8fb462 (diff) | |
| download | php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.tar.gz php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.tar.zst php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/io/buffer_io.rs')
| -rw-r--r-- | crates/shirabe/src/io/buffer_io.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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<std::rc::Rc<std::cell::RefCell<dyn OutputFormatterInterface>>>, - ) -> Result<Self> { + ) -> anyhow::Result<Self> { 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<String>) -> Result<()> { + pub fn set_user_inputs(&mut self, inputs: Vec<String>) -> 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<String>) -> Result<PhpResource> { + fn create_stream(&self, inputs: Vec<String>) -> anyhow::Result<PhpResource> { let stream = match fopen("php://memory", "r+") { Ok(stream) => stream, Err(_) => { |
