- Remove unnecessary references and derefs
- Manual formatting
This commit is contained in:
Ryo Yoshida 2023-02-19 19:02:51 +09:00
parent a6603fc21d
commit 443801755c
No known key found for this signature in database
GPG key ID: E25698A930586171
4 changed files with 14 additions and 13 deletions

View file

@ -50,7 +50,7 @@ impl HirDisplay for Function {
let write_self_param = |ty: &TypeRef, f: &mut HirFormatter<'_>| match ty {
TypeRef::Path(p) if p.is_self_type() => f.write_str("self"),
TypeRef::Reference(inner, lifetime, mut_) if matches!(&**inner,TypeRef::Path(p) if p.is_self_type()) =>
TypeRef::Reference(inner, lifetime, mut_) if matches!(&**inner, TypeRef::Path(p) if p.is_self_type()) =>
{
f.write_char('&')?;
if let Some(lifetime) = lifetime {