From a9f19862350c6fd3592d93515d869ffe07ecb399 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 4 Jun 2026 21:08:22 +0900 Subject: feat: resolve trivial todo!() sites with existing constructors Replace todo!("VersionParser::new()") with VersionParser::new() at 6 call sites (array_loader, base_command, create_project_command, vcs_repository, http_downloader x2) and EventDispatcher::io_clone with self.io.clone(). All targets already exist on their types. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/util/http_downloader.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/util') diff --git a/crates/shirabe/src/util/http_downloader.rs b/crates/shirabe/src/util/http_downloader.rs index 89bf0a4..b33ed58 100644 --- a/crates/shirabe/src/util/http_downloader.rs +++ b/crates/shirabe/src/util/http_downloader.rs @@ -712,8 +712,7 @@ impl HttpDownloader { let versions_key = format!("{}-versions", r#type); if let Some(versions_value) = data.get(&versions_key) { if !shirabe_php_shim::empty(versions_value) { - // TODO(phase-b): VersionParser::new - let version_parser: VersionParser = todo!("VersionParser::new()"); + let version_parser: VersionParser = VersionParser::new(); let constraint = version_parser .parse_constraints(versions_value.as_string().unwrap_or(""))?; let composer_constraint = SimpleConstraint::new( @@ -745,8 +744,7 @@ impl HttpDownloader { continue; } - // TODO(phase-b): VersionParser::new - let version_parser: VersionParser = todo!("VersionParser::new()"); + let version_parser: VersionParser = VersionParser::new(); if let Some(PhpMixed::List(list)) = entry { for spec in list { let r#type = substr(key, 0, Some(-1)); -- cgit v1.3.1