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/util/platform.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/util/platform.rs') diff --git a/crates/shirabe/src/util/platform.rs b/crates/shirabe/src/util/platform.rs index 596a634b..ccdd30b6 100644 --- a/crates/shirabe/src/util/platform.rs +++ b/crates/shirabe/src/util/platform.rs @@ -237,9 +237,7 @@ impl Platform { None => continue, }; // detect default mount points created by Docker/containerd - if shirabe_php_shim::str_contains(&data, "/var/lib/docker/") - || shirabe_php_shim::str_contains(&data, "/io.containerd.snapshotter") - { + if data.contains("/var/lib/docker/") || data.contains("/io.containerd.snapshotter") { *cached = Some(true); return true; } @@ -357,7 +355,7 @@ impl Platform { let mut output = String::new(); let result: anyhow::Result<()> = (|| { if process.execute_args(&["lsmod".to_string()], &mut output, None) == 0 - && shirabe_php_shim::str_contains(&output, "vboxguest") + && output.contains("vboxguest") { *cached = Some(true); return Ok(()); -- cgit v1.3.1-4-g156e