From 38621c67917fd015f884ea04517791cdc5058c6d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 11 Aug 2026 23:28:40 +0900 Subject: chore(php-shim): drop the substring predicate ports str_contains(), str_starts_with() and str_ends_with() were thin wrappers over the str methods of the same semantics. Call sites now use contains()/starts_with()/ends_with() directly. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/json/json_manipulator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/json/json_manipulator.rs') diff --git a/crates/shirabe/src/json/json_manipulator.rs b/crates/shirabe/src/json/json_manipulator.rs index 5a77e771..bbd032e7 100644 --- a/crates/shirabe/src/json/json_manipulator.rs +++ b/crates/shirabe/src/json/json_manipulator.rs @@ -8,8 +8,8 @@ use shirabe_pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ InvalidArgumentException, LogicException, PhpMixed, addcslashes, array_key_exists, array_keys, array_reverse, empty, explode, implode, in_array_loose, is_array, is_int, is_numeric, - json_decode, php_regex, php_truthy, preg_quote, rtrim, str_contains, str_repeat, str_replace, - strlen, strnatcmp, strpos, substr, trim, uksort, + json_decode, php_regex, php_truthy, preg_quote, rtrim, str_repeat, str_replace, strlen, + strnatcmp, strpos, substr, trim, uksort, }; #[derive(Debug)] @@ -1061,7 +1061,7 @@ impl JsonManipulator { let mut item_depth: i64 = 1; // keep oneline lists as one line - if !str_contains(&whitespace, &self.newline) { + if !whitespace.contains(&self.newline) { leading_item_whitespace = leading_whitespace.clone(); trailing_item_whitespace = leading_whitespace.clone(); item_depth = 0; -- cgit v1.3.1-4-g156e