mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-22 19:42:31 +00:00
Merge pull request #3403 from rtfeldman/clippy-1.62
updates for clippy 1.62
This commit is contained in:
commit
cd2cf045fa
10 changed files with 73 additions and 56 deletions
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue