Fix some clippy lints
This commit is contained in:
parent
b7ebc6b0c1
commit
0ad3dce83a
9 changed files with 28 additions and 33 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue