As storing format_args!() in a variable is stabilized in 1.89.0, these can be changed.
|
let backtrace_info; |
|
#[cfg(feature = "std")] |
|
{ |
|
// TODO: Allocation could be avoided here if https://github.com/rust-lang/rust/pull/139135 is merged and stabilized. |
|
backtrace_info = format!( |
|
", |
|
backtrace: {}", |
|
self.backtrace |
|
) |
|
} |
|
#[cfg(not(feature = "std"))] |
|
{ |
|
backtrace_info = "" |
|
} |
|
let backtrace_info; |
|
#[cfg(feature = "std")] |
|
{ |
|
// TODO: Allocation could be avoided here if https://github.com/rust-lang/rust/pull/139135 is merged and stabilized. |
|
backtrace_info = format!( |
|
", |
|
backtrace: {}", |
|
chunk.backtrace |
|
) |
|
} |
|
#[cfg(not(feature = "std"))] |
|
{ |
|
backtrace_info = "" |
|
} |
As
storing format_args!() in a variableis stabilized in 1.89.0, these can be changed.gpu-allocator/src/allocator/dedicated_block_allocator/mod.rs
Lines 105 to 118 in 673e4ec
gpu-allocator/src/allocator/free_list_allocator/mod.rs
Lines 381 to 394 in 673e4ec