Skip to content

Replace format! with format_args! when MSRV >= 1.89.0 #286

@CrazyboyQCD

Description

@CrazyboyQCD

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 = ""
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions