From c935842b0c0c2d2c62b3a718ebe0017b7b192318 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 4 Jun 2026 21:07:47 +0900 Subject: refactor: drop stale phase-b TODO comments resolved by current code These TODOs describe work already done: writeError per-line iteration (github, remote_filesystem, svn_downloader) and reference equality via std::ptr::eq (download_manager). No behavior change. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/downloader/download_manager.rs | 1 - crates/shirabe/src/downloader/svn_downloader.rs | 3 --- crates/shirabe/src/util/github.rs | 1 - crates/shirabe/src/util/remote_filesystem.rs | 3 --- 4 files changed, 8 deletions(-) diff --git a/crates/shirabe/src/downloader/download_manager.rs b/crates/shirabe/src/downloader/download_manager.rs index b230ae3..7d5d76d 100644 --- a/crates/shirabe/src/downloader/download_manager.rs +++ b/crates/shirabe/src/downloader/download_manager.rs @@ -174,7 +174,6 @@ impl DownloadManager { pub fn get_downloader_type(&self, downloader: &dyn DownloaderInterface) -> String { // PHP: array_search($downloader, $this->downloaders) - // TODO(phase-b): reference equality on Box for (r#type, candidate) in &self.downloaders { if std::ptr::eq( candidate.as_ref() as *const dyn DownloaderInterface as *const (), diff --git a/crates/shirabe/src/downloader/svn_downloader.rs b/crates/shirabe/src/downloader/svn_downloader.rs index 8ac3e99..1e00c03 100644 --- a/crates/shirabe/src/downloader/svn_downloader.rs +++ b/crates/shirabe/src/downloader/svn_downloader.rs @@ -229,7 +229,6 @@ impl SvnDownloader { io_interface::NORMAL, ); let slice_end = 10_usize.min(changes.len()); - // TODO(phase-b): PHP writeError accepts array; iterate per-line for now. for line in &changes[..slice_end] { self.inner.io.write_error3(line, true, io_interface::NORMAL); } @@ -268,13 +267,11 @@ impl SvnDownloader { .into()); } Some("v") => { - // TODO(phase-b): PHP writeError accepts array; iterate per-line. for line in &changes { self.inner.io.write_error3(line, true, io_interface::NORMAL); } } _ => { - // TODO(phase-b): PHP writeError accepts array; iterate per-line. let help_lines = vec![ format!( " y - discard changes and apply the {}", diff --git a/crates/shirabe/src/util/github.rs b/crates/shirabe/src/util/github.rs index 650ae33..18958ca 100644 --- a/crates/shirabe/src/util/github.rs +++ b/crates/shirabe/src/util/github.rs @@ -114,7 +114,6 @@ impl GitHub { } note += &format!(" {}", date("Y-m-d Hi", None)); - // PHP: writeError(array) joins with newline. TODO(phase-b): writeError accepts array natively in Symfony. let (local_name, auth_name): (Option, String) = { let cfg = self.config.borrow(); ( diff --git a/crates/shirabe/src/util/remote_filesystem.rs b/crates/shirabe/src/util/remote_filesystem.rs index 2773300..bd4aaa8 100644 --- a/crates/shirabe/src/util/remote_filesystem.rs +++ b/crates/shirabe/src/util/remote_filesystem.rs @@ -430,7 +430,6 @@ impl RemoteFilesystem { if !self.degraded_mode && strpos(&msg_owned, "Operation timed out").is_some() { self.degraded_mode = true; self.io.write_error3("", true, crate::io::NORMAL); - // TODO(phase-b): PHP writeError accepts an array of lines; joined here with newline. self.io.write_error3( &format!( "{}\nRetrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info", @@ -579,7 +578,6 @@ impl RemoteFilesystem { } self.degraded_mode = true; - // TODO(phase-b): PHP writeError accepts an array of lines; joined here with newline. self.io.write_error3( &format!( "\nFailed to decode response: {}\nRetrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info", @@ -670,7 +668,6 @@ impl RemoteFilesystem { if !self.degraded_mode && strpos(&msg_owned, "Operation timed out").is_some() { self.degraded_mode = true; self.io.write_error3("", true, crate::io::NORMAL); - // TODO(phase-b): PHP writeError accepts an array of lines; joined here with newline. self.io.write_error3( &format!( "{}\nRetrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info", -- cgit v1.3.1