From e283399a0304846bbff8484f455c50ecb3de7048 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 20:27:13 +0900 Subject: refactor(php-shim): drop reset()/reset_first()/end_arr() array helpers These slice/map wrappers mirrored PHP's internal array pointer and have no clean Rust equivalent. Remove them and replace the lone caller with direct first-element access; the rest were unused imports. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe-php-shim/src/array.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'crates/shirabe-php-shim') diff --git a/crates/shirabe-php-shim/src/array.rs b/crates/shirabe-php-shim/src/array.rs index e7738cc..7c400fb 100644 --- a/crates/shirabe-php-shim/src/array.rs +++ b/crates/shirabe-php-shim/src/array.rs @@ -701,18 +701,6 @@ pub fn count(value: &PhpMixed) -> usize { } } -pub fn reset(_array: &[T]) -> Option { - _array.first().cloned() -} - -pub fn reset_first(_array: &[T]) -> Option { - _array.first().cloned() -} - -pub fn end_arr(_array: &IndexMap) -> Option { - _array.values().last().cloned() -} - pub fn iterator_to_array(iter: I) -> Vec where I: IntoIterator, -- cgit v1.3.1