use references in Generics iter methods

This commit is contained in:
dfireBird 2024-03-19 12:57:18 +05:30
parent b357bcab2b
commit 0e54e2b55a
No known key found for this signature in database
GPG key ID: 26D522CA5FC2B93D
4 changed files with 34 additions and 27 deletions

View file

@ -3,7 +3,6 @@
//! purposes.
use std::{
cmp::Ordering,
fmt::{self, Debug},
mem::size_of,
};
@ -1324,6 +1323,7 @@ fn hir_fmt_generics(
) -> Result<(), HirDisplayError> {
let db = f.db;
if parameters.len(Interner) > 0 {
use std::cmp::Ordering;
let param_compare =
|a: &GenericArg, b: &GenericArg| match (a.data(Interner), b.data(Interner)) {
(crate::GenericArgData::Lifetime(_), crate::GenericArgData::Lifetime(_)) => {