From 2d474e91e49c7343d28198eff2b5bbbed9afbcee Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 10 Jun 2026 02:41:34 +0900 Subject: feat(phase-c): resolve cross-module phase-b TODOs --- crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs') diff --git a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs index 7eb253a..59e6b88 100644 --- a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs +++ b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs @@ -494,7 +494,9 @@ impl GitBitbucketDriver { /// @inheritDoc pub fn get_source(&self, identifier: &str) -> IndexMap { if let Some(fallback) = self.fallback_driver.as_ref() { - // TODO(phase-b): trait returns Result; flatten for the inherent signature here + // TODO(phase-c): PHP getSource is infallible (: array), but the Rust trait made it + // Result, so the fallback's Result is flattened here. The faithful fix is making the + // VcsDriverInterface get_source/get_dist infallible across all implementations. return fallback.get_source(identifier).unwrap_or_default(); } @@ -511,7 +513,7 @@ impl GitBitbucketDriver { /// @inheritDoc pub fn get_dist(&self, identifier: &str) -> Option> { if let Some(fallback) = self.fallback_driver.as_ref() { - // TODO(phase-b): trait returns Result; flatten for the inherent signature here + // TODO(phase-c): see get_source above — the trait's over-fallibility is flattened here. return fallback.get_dist(identifier).ok().flatten(); } @@ -886,14 +888,14 @@ impl GitBitbucketDriver { } if !extension_loaded("openssl") { - io.write_error( + io.write_error3( &format!( "Skipping Bitbucket git driver for {} because the OpenSSL PHP extension is missing.", url ), + true, + io_interface::VERBOSE, ); - // PHP: writeError(..., true, io_interface::VERBOSE) - // TODO(phase-b): io_interface::VERBOSE verbosity argument return Ok(false); } -- cgit v1.3.1