diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 20:27:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 20:27:13 +0900 |
| commit | e283399a0304846bbff8484f455c50ecb3de7048 (patch) | |
| tree | 0035845f7d362108b51b9358c8a02465bbdcf7b2 /crates/shirabe-php-shim/src/array.rs | |
| parent | e4402e52c08b8b28497151302c994793ce885cc3 (diff) | |
| download | php-shirabe-e283399a0304846bbff8484f455c50ecb3de7048.tar.gz php-shirabe-e283399a0304846bbff8484f455c50ecb3de7048.tar.zst php-shirabe-e283399a0304846bbff8484f455c50ecb3de7048.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim/src/array.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/array.rs | 12 |
1 files changed, 0 insertions, 12 deletions
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<T: Clone>(_array: &[T]) -> Option<T> { - _array.first().cloned() -} - -pub fn reset_first<T: Clone>(_array: &[T]) -> Option<T> { - _array.first().cloned() -} - -pub fn end_arr<V: Clone>(_array: &IndexMap<String, V>) -> Option<V> { - _array.values().last().cloned() -} - pub fn iterator_to_array<I>(iter: I) -> Vec<I::Item> where I: IntoIterator, |
