From 27d00055df8691a6bd99aaf38633a7338b16cc6a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 11 Jul 2026 16:33:05 +0900 Subject: chore: use fully-qualified name for Rc/RefCell --- crates/shirabe/src/util/error_handler.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/util') diff --git a/crates/shirabe/src/util/error_handler.rs b/crates/shirabe/src/util/error_handler.rs index 45ad28a8..7a9cf9c2 100644 --- a/crates/shirabe/src/util/error_handler.rs +++ b/crates/shirabe/src/util/error_handler.rs @@ -7,14 +7,13 @@ use shirabe_php_shim::{ STDERR, debug_backtrace, error_reporting, filter_var_boolean, fwrite, ini_get, set_error_handler, }; -use std::cell::{Cell, RefCell}; -use std::rc::Rc; +use std::cell::Cell; // PHP keeps `$io` / `$hasShownDeprecationNotice` as process-global statics. Composer runs // single-threaded, so thread-locals on the main thread reproduce that faithfully while letting // us hold the same shared (`Rc>`) IO instance the application uses. thread_local! { - static IO: RefCell>>> = const { RefCell::new(None) }; + static IO: std::cell::RefCell>>> = const { std::cell::RefCell::new(None) }; static HAS_SHOWN_DEPRECATION_NOTICE: Cell = const { Cell::new(0) }; } @@ -88,7 +87,7 @@ impl ErrorHandler { Ok(true) } - pub fn register(io: Option>>) { + pub fn register(io: Option>>) { set_error_handler(|level, message, file, line| { Self::handle(level, message.to_string(), file.to_string(), line).unwrap_or(true) }); -- cgit v1.3.1