aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/platform_repository.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-20 18:34:54 +0900
committernsfisis <nsfisis@gmail.com>2026-06-20 18:34:54 +0900
commit81b9fc9d92bb74aa8428ae4db39bd84e8c16095c (patch)
tree3efb6476d797e2a95545c4c3abba468c3e3c8d52 /crates/shirabe/src/repository/platform_repository.rs
parentc09cd630afb4bb0ca10e926f93bf706ca828ae85 (diff)
downloadphp-shirabe-81b9fc9d92bb74aa8428ae4db39bd84e8c16095c.tar.gz
php-shirabe-81b9fc9d92bb74aa8428ae4db39bd84e8c16095c.tar.zst
php-shirabe-81b9fc9d92bb74aa8428ae4db39bd84e8c16095c.zip
refactor(php-shim): drop Box wrapping from PhpMixed List/Array
The List and Array variants of PhpMixed boxed their elements unnecessarily. Store PhpMixed values directly and update all callers accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository/platform_repository.rs')
-rw-r--r--crates/shirabe/src/repository/platform_repository.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/shirabe/src/repository/platform_repository.rs b/crates/shirabe/src/repository/platform_repository.rs
index f345eaa..e006d19 100644
--- a/crates/shirabe/src/repository/platform_repository.rs
+++ b/crates/shirabe/src/repository/platform_repository.rs
@@ -325,7 +325,7 @@ impl PlatformRepository {
loaded_extensions
.iter()
.enumerate()
- .map(|(i, s)| (i.to_string(), Box::new(PhpMixed::String(s.clone()))))
+ .map(|(i, s)| (i.to_string(), PhpMixed::String(s.clone())))
.collect(),
),
true,
@@ -824,13 +824,13 @@ impl PlatformRepository {
Box::new(|_args| PhpMixed::Null),
vec![
PhpMixed::List(vec![
- Box::new(PhpMixed::String("ResourceBundle".to_string())),
- Box::new(PhpMixed::String("create".to_string())),
+ PhpMixed::String("ResourceBundle".to_string()),
+ PhpMixed::String("create".to_string()),
]),
PhpMixed::List(vec![
- Box::new(PhpMixed::String("root".to_string())),
- Box::new(PhpMixed::String("ICUDATA".to_string())),
- Box::new(PhpMixed::Bool(false)),
+ PhpMixed::String("root".to_string()),
+ PhpMixed::String("ICUDATA".to_string()),
+ PhpMixed::Bool(false),
]),
],
);
@@ -857,8 +857,8 @@ impl PlatformRepository {
let intl_char_versions = self.runtime.invoke(
Box::new(|_args| PhpMixed::Null),
vec![PhpMixed::List(vec![
- Box::new(PhpMixed::String("IntlChar".to_string())),
- Box::new(PhpMixed::String("getUnicodeVersion".to_string())),
+ PhpMixed::String("IntlChar".to_string()),
+ PhpMixed::String("getUnicodeVersion".to_string()),
])],
);
let sliced =
@@ -1840,7 +1840,7 @@ impl PlatformRepository {
match value {
PhpMixed::List(list) => list
.iter()
- .map(|v| match v.as_ref() {
+ .map(|v| match v {
PhpMixed::String(s) => s.clone(),
PhpMixed::Int(i) => i.to_string(),
PhpMixed::Float(f) => f.to_string(),
@@ -1849,7 +1849,7 @@ impl PlatformRepository {
.collect(),
PhpMixed::Array(m) => m
.values()
- .map(|v| match v.as_ref() {
+ .map(|v| match v {
PhpMixed::String(s) => s.clone(),
PhpMixed::Int(i) => i.to_string(),
PhpMixed::Float(f) => f.to_string(),