1
Fork 0

Fix some clippy lints

This commit is contained in:
Joshua Nelson 2020-12-03 17:06:58 -05:00
parent b7ebc6b0c1
commit 0ad3dce83a
9 changed files with 28 additions and 33 deletions

View file

@ -1362,15 +1362,13 @@ impl fmt::Display for IdentPrinter {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if self.is_raw {
f.write_str("r#")?;
} else {
if self.symbol == kw::DollarCrate {
if let Some(span) = self.convert_dollar_crate {
let converted = span.ctxt().dollar_crate_name();
if !converted.is_path_segment_keyword() {
f.write_str("::")?;
}
return fmt::Display::fmt(&converted, f);
} else if self.symbol == kw::DollarCrate {
if let Some(span) = self.convert_dollar_crate {
let converted = span.ctxt().dollar_crate_name();
if !converted.is_path_segment_keyword() {
f.write_str("::")?;
}
return fmt::Display::fmt(&converted, f);
}
}
fmt::Display::fmt(&self.symbol, f)