Remove redundant to_ident_string calls
This commit is contained in:
parent
ac1c6c50f4
commit
c08624d8d2
10 changed files with 14 additions and 18 deletions
|
@ -1636,13 +1636,12 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
|
|||
.enumerate()
|
||||
.map(|(idx, new)| (new, old_fields.get(idx)))
|
||||
.map(|(new, old)| {
|
||||
let new = new.name.to_ident_string();
|
||||
if let Some(Some(old)) = old
|
||||
&& new != *old
|
||||
&& new.as_str() != old
|
||||
{
|
||||
format!("{new}: {old}")
|
||||
} else {
|
||||
new
|
||||
new.to_string()
|
||||
}
|
||||
})
|
||||
.collect::<Vec<String>>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue