mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Refactor
- Remove unnecessary references and derefs - Manual formatting
This commit is contained in:
parent
a6603fc21d
commit
443801755c
4 changed files with 14 additions and 13 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue