aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/error_handler.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 00:10:22 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 00:11:03 +0900
commitc839244d8d09f3036ebfee8eef7eb6b147e593ab (patch)
treefe48c94f2c2e62468beef5ff1a8f3cff6adeef4f /crates/shirabe/src/util/error_handler.rs
parent48839250146b217e2756ed3c0e624fd341b54d6c (diff)
downloadphp-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.gz
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.zst
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.zip
fix(compile): fix various compile errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/error_handler.rs')
-rw-r--r--crates/shirabe/src/util/error_handler.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/error_handler.rs b/crates/shirabe/src/util/error_handler.rs
index aff263e..d531658 100644
--- a/crates/shirabe/src/util/error_handler.rs
+++ b/crates/shirabe/src/util/error_handler.rs
@@ -65,12 +65,12 @@ impl ErrorHandler {
});
}
- let io_guard = io().lock().unwrap();
+ let mut io_guard = io().lock().unwrap();
if io_guard.is_some() {
let has_shown = *HAS_SHOWN_DEPRECATION_NOTICE.lock().unwrap();
if has_shown > 0 && !io_guard.as_ref().unwrap().is_verbose() {
if has_shown == 1 {
- io_guard.as_ref().unwrap().write_error("<warning>More deprecation notices were hidden, run again with `-v` to show them.</warning>");
+ io_guard.as_mut().unwrap().write_error("<warning>More deprecation notices were hidden, run again with `-v` to show them.</warning>");
*HAS_SHOWN_DEPRECATION_NOTICE.lock().unwrap() = 2;
}
return Ok(true);
@@ -95,8 +95,8 @@ impl ErrorHandler {
}
fn output_warning(message: &str, output_even_without_io: bool) {
- let io_guard = io().lock().unwrap();
- if let Some(ref io) = *io_guard {
+ let mut io_guard = io().lock().unwrap();
+ if let Some(io) = io_guard.as_mut() {
io.write_error(&format!("<warning>{}</warning>", message));
if io.is_verbose() {
io.write_error("<warning>Stack trace:</warning>");