writeln->println, ignore clippy

This commit is contained in:
Anton-4 2022-07-03 14:48:03 +02:00
parent 7c93d237ce
commit 46bdd4072a
No known key found for this signature in database
GPG key ID: C954D6E0F9C0ABFD

View file

@ -163,6 +163,7 @@ impl Symbol {
/// `Foo.bar`
impl fmt::Debug for Symbol {
#[cfg(debug_assertions)]
#[allow(clippy::print_in_format_impl)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if PRETTY_PRINT_DEBUG_SYMBOLS {
let module_id = self.module_id();
@ -181,7 +182,7 @@ impl fmt::Debug for Symbol {
// might be used in a panic error message, and if we panick
// while we're already panicking it'll kill the process
// without printing any of the errors!
writeln!(f, "DEBUG INFO: Failed to acquire lock for Debug reading from DEBUG_IDENT_IDS_BY_MODULE_ID, presumably because a thread panicked: {:?}", err)?;
eprintln!("DEBUG INFO: Failed to acquire lock for Debug reading from DEBUG_IDENT_IDS_BY_MODULE_ID, presumably because a thread panicked: {:?}", err);
fallback_debug_fmt(*self, f)
}