From b15166490944e90c083c93086e849656535494e3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 20:49:33 +0900 Subject: fix(path): propagate PathBuf Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/symfony/finder/finder.rs | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'crates/shirabe-external-packages') diff --git a/crates/shirabe-external-packages/src/symfony/finder/finder.rs b/crates/shirabe-external-packages/src/symfony/finder/finder.rs index ec596b1..9ca17d5 100644 --- a/crates/shirabe-external-packages/src/symfony/finder/finder.rs +++ b/crates/shirabe-external-packages/src/symfony/finder/finder.rs @@ -1,6 +1,6 @@ //! ref: composer/vendor/symfony/finder/Finder.php -use crate::symfony::finder::SplFileInfo; +use std::path::{Path, PathBuf}; /// Helper trait so `Finder::exclude` accepts both single strings and slices /// (PHP's variadic / array argument compatibility). @@ -42,7 +42,7 @@ impl Finder { todo!() } - pub fn r#in(&mut self, _dirs: &str) -> &mut Self { + pub fn r#in(&mut self, _dirs: impl AsRef) -> &mut Self { todo!() } @@ -80,7 +80,7 @@ impl Finder { pub fn sort(&mut self, _comparator: F) -> &mut Self where - F: FnMut(&SplFileInfo, &SplFileInfo) -> i64, + F: FnMut(&PathBuf, &PathBuf) -> i64, { todo!() } @@ -101,7 +101,7 @@ impl Finder { todo!() } - pub fn iter(&self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator { todo!(); std::iter::empty() } @@ -116,8 +116,8 @@ impl Finder { } impl IntoIterator for &Finder { - type Item = SplFileInfo; - type IntoIter = std::vec::IntoIter; + type Item = PathBuf; + type IntoIter = std::vec::IntoIter; fn into_iter(self) -> Self::IntoIter { todo!() @@ -132,22 +132,22 @@ impl FinderIterator { todo!() } - pub fn current(&self) -> SplFileInfo { + pub fn current(&self) -> PathBuf { todo!() } } impl Iterator for FinderIterator { - type Item = SplFileInfo; + type Item = PathBuf; - fn next(&mut self) -> Option { + fn next(&mut self) -> Option { todo!() } } impl IntoIterator for Finder { - type Item = SplFileInfo; - type IntoIter = std::vec::IntoIter; + type Item = PathBuf; + type IntoIter = std::vec::IntoIter; fn into_iter(self) -> Self::IntoIter { todo!() @@ -155,8 +155,8 @@ impl IntoIterator for Finder { } impl IntoIterator for &mut Finder { - type Item = SplFileInfo; - type IntoIter = std::vec::IntoIter; + type Item = PathBuf; + type IntoIter = std::vec::IntoIter; fn into_iter(self) -> Self::IntoIter { todo!() -- cgit v1.3.1