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/util/auth_helper.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/util/auth_helper.rs')
| -rw-r--r-- | crates/shirabe/src/util/auth_helper.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/auth_helper.rs b/crates/shirabe/src/util/auth_helper.rs index 8a89842..13199e9 100644 --- a/crates/shirabe/src/util/auth_helper.rs +++ b/crates/shirabe/src/util/auth_helper.rs @@ -8,7 +8,6 @@ use crate::io::io_interface; use crate::util::Bitbucket; use crate::util::GitHub; use crate::util::GitLab; -use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::Preg; use shirabe_php_shim::{ @@ -54,7 +53,7 @@ impl AuthHelper { } /// @param 'prompt'|bool $storeAuth - pub fn store_auth(&self, origin: &str, store_auth: StoreAuth) -> Result<()> { + pub fn store_auth(&self, origin: &str, store_auth: StoreAuth) -> anyhow::Result<()> { let mut store: Option<()> = None; let mut config = self.config.borrow_mut(); let config_source = config.get_auth_config_source_mut(); @@ -123,7 +122,7 @@ impl AuthHelper { headers: Vec<String>, retry_count: i64, response_body: Option<&str>, - ) -> Result<PromptAuthResult> { + ) -> anyhow::Result<PromptAuthResult> { let mut store_auth: StoreAuth = StoreAuth::Bool(false); let github_domains = self.config.borrow_mut().get("github-domains"); @@ -450,7 +449,7 @@ impl AuthHelper { mut options: IndexMap<String, PhpMixed>, origin: &str, url: &str, - ) -> Result<IndexMap<String, PhpMixed>> { + ) -> anyhow::Result<IndexMap<String, PhpMixed>> { if !options.contains_key("http") { options.insert("http".to_string(), PhpMixed::Array(IndexMap::new())); } |
