Remove String
allocation in loop
This commit is contained in:
parent
51e8031e14
commit
141c542052
1 changed files with 1 additions and 3 deletions
|
@ -141,9 +141,7 @@ crate fn print_generic_bounds<'a, 'tcx: 'a>(
|
|||
display_fn(move |f| {
|
||||
let mut bounds_dup = FxHashSet::default();
|
||||
|
||||
for (i, bound) in
|
||||
bounds.iter().filter(|b| bounds_dup.insert(b.print(cx).to_string())).enumerate()
|
||||
{
|
||||
for (i, bound) in bounds.iter().filter(|b| bounds_dup.insert(b.clone())).enumerate() {
|
||||
if i > 0 {
|
||||
f.write_str(" + ")?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue