Skip to content

Commit

Permalink
glib: Work around Rust <1.80 borrow checker issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sdroege committed Oct 29, 2024
1 parent ecf274c commit 71ba97a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion glib/src/bridged_logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 71ba97a

Please sign in to comment.