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/cache.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/cache.rs')
| -rw-r--r-- | crates/shirabe/src/cache.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/shirabe/src/cache.rs b/crates/shirabe/src/cache.rs index b2e2f3f..87f6ea4 100644 --- a/crates/shirabe/src/cache.rs +++ b/crates/shirabe/src/cache.rs @@ -5,7 +5,6 @@ use crate::io::IOInterfaceImmutable; use crate::util::Filesystem; use crate::util::Platform; use crate::util::Silencer; -use anyhow::Result; use chrono::Utc; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_external_packages::symfony::finder::Finder; @@ -138,7 +137,7 @@ impl Cache { None } - pub fn write(&mut self, file: &str, contents: &str) -> Result<bool> { + pub fn write(&mut self, file: &str, contents: &str) -> anyhow::Result<bool> { let was_enabled = self.enabled == Some(true); if self.is_enabled() && !self.read_only { @@ -241,7 +240,7 @@ impl Cache { } /// Copy a file out of the cache - pub fn copy_to(&mut self, file: &str, target: &str) -> Result<bool> { + pub fn copy_to(&mut self, file: &str, target: &str) -> anyhow::Result<bool> { if self.is_enabled() { let file = Preg::replace(&format!("{{[^{}]}}i", self.allowlist), "-", file); let full_path = format!("{}{}", self.root, file); |
