From 71ba97ae134a07f88e060dd2c30caeffde357a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Oct 2024 18:12:26 +0200 Subject: [PATCH] glib: Work around Rust <1.80 borrow checker issues --- glib/src/bridged_logging.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glib/src/bridged_logging.rs b/glib/src/bridged_logging.rs index 17ca1e8f7e31..1a34bdb76f85 100644 --- a/glib/src/bridged_logging.rs +++ b/glib/src/bridged_logging.rs @@ -217,10 +217,12 @@ impl rs_log::Log for GlibLogger { } GlibLoggerFormat::Structured => { let args = record.args(); + let args_str; let message = if let Some(s) = args.as_str() { s } else { - &args.to_string() + args_str = args.to_string(); + &args_str }; GlibLogger::write_log_structured( domain,