Merge pull request #3403 from rtfeldman/clippy-1.62

updates for clippy 1.62
This commit is contained in:
Richard Feldman 2022-07-05 18:26:52 -04:00 committed by GitHub
commit cd2cf045fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 73 additions and 56 deletions

View file

@ -106,7 +106,7 @@ impl<'a> From<&'a str> for ModuleName {
}
}
impl<'a> From<IdentStr> for ModuleName {
impl From<IdentStr> for ModuleName {
fn from(string: IdentStr) -> Self {
Self(string.as_str().into())
}
@ -152,7 +152,7 @@ impl<'a> From<&'a str> for ForeignSymbol {
}
}
impl<'a> From<String> for ForeignSymbol {
impl From<String> for ForeignSymbol {
fn from(string: String) -> Self {
Self(string.into())
}
@ -174,7 +174,7 @@ impl<'a> From<&'a str> for Uppercase {
}
}
impl<'a> From<String> for Uppercase {
impl From<String> for Uppercase {
fn from(string: String) -> Self {
Self(string.into())
}
@ -198,7 +198,7 @@ impl<'a> From<&'a Lowercase> for &'a str {
}
}
impl<'a> From<String> for Lowercase {
impl From<String> for Lowercase {
fn from(string: String) -> Self {
Self(string.into())
}

View file

@ -181,7 +181,10 @@ 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!
println!("DEBUG INFO: Failed to acquire lock for Debug reading from DEBUG_IDENT_IDS_BY_MODULE_ID, presumably because a thread panicked: {:?}", err);
use std::io::Write;
let mut stderr = std::io::stderr();
writeln!(stderr, "DEBUG INFO: Failed to acquire lock for Debug reading from DEBUG_IDENT_IDS_BY_MODULE_ID, presumably because a thread panicked: {:?}", err).unwrap();
fallback_debug_fmt(*self, f)
}