aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/autoload/class_loader.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-17 02:53:53 +0900
committernsfisis <nsfisis@gmail.com>2026-05-17 02:53:53 +0900
commita1c7e6908a26e10f6e1f23a51721664b5e2d838d (patch)
treec575c76f1b43359ed74913da4c6a2636643f1ba0 /crates/shirabe/src/autoload/class_loader.rs
parent7f606f36fef0c0467c3c0db3d0da33af486dae8a (diff)
downloadphp-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.gz
php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.zst
php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.zip
chore(style): cargo fmt
Diffstat (limited to 'crates/shirabe/src/autoload/class_loader.rs')
-rw-r--r--crates/shirabe/src/autoload/class_loader.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/shirabe/src/autoload/class_loader.rs b/crates/shirabe/src/autoload/class_loader.rs
index 9727a45..2f4cfa0 100644
--- a/crates/shirabe/src/autoload/class_loader.rs
+++ b/crates/shirabe/src/autoload/class_loader.rs
@@ -4,10 +4,10 @@ use indexmap::IndexMap;
use std::sync::{LazyLock, Mutex};
use shirabe_php_shim::{
- apcu_add, apcu_fetch, array_merge, array_values, call_user_func_array, defined, file_exists,
- filter_var, function_exists, include_file, ini_get, spl_autoload_register,
- spl_autoload_unregister, stream_resolve_include_path, strlen, strpos, strrpos, strtr, substr,
- InvalidArgumentException, PhpMixed, DIRECTORY_SEPARATOR, FILTER_VALIDATE_BOOLEAN,
+ DIRECTORY_SEPARATOR, FILTER_VALIDATE_BOOLEAN, InvalidArgumentException, PhpMixed, apcu_add,
+ apcu_fetch, array_merge, array_values, call_user_func_array, defined, file_exists, filter_var,
+ function_exists, include_file, ini_get, spl_autoload_register, spl_autoload_unregister,
+ stream_resolve_include_path, strlen, strpos, strrpos, strtr, substr,
};
/// @var array<string, self>
@@ -314,8 +314,7 @@ impl ClassLoader {
&& filter_var(
&ini_get("apc.enabled").unwrap_or_default(),
FILTER_VALIDATE_BOOLEAN,
- )
- {
+ ) {
apcu_prefix
} else {
None
@@ -344,8 +343,7 @@ impl ClassLoader {
if prepend {
let mut new_map: IndexMap<String, ClassLoader> = IndexMap::new();
new_map.insert(self.vendor_dir.clone().unwrap(), self.clone());
- let old_map: IndexMap<String, ClassLoader> =
- std::mem::take(&mut *registered);
+ let old_map: IndexMap<String, ClassLoader> = std::mem::take(&mut *registered);
for (k, v) in old_map {
if !new_map.contains_key(&k) {
new_map.insert(k, v);