reduce borrowing and (de)referencing around match patterns (clippy::match_ref_pats)
This commit is contained in:
parent
90ccf4f5ad
commit
8a90626a46
28 changed files with 89 additions and 91 deletions
|
@ -582,7 +582,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
}
|
||||
ref v => {
|
||||
let mut value = format!("{}::{}", enum_data.name, name);
|
||||
if let &hir::VariantData::Tuple(ref fields, _) = v {
|
||||
if let hir::VariantData::Tuple(fields, _) = v {
|
||||
value.push('(');
|
||||
value.push_str(
|
||||
&fields
|
||||
|
@ -653,7 +653,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
let map = &self.tcx.hir();
|
||||
self.nest_typeck_results(map.local_def_id(item.hir_id), |v| {
|
||||
v.visit_ty(&typ);
|
||||
if let &Some(ref trait_ref) = trait_ref {
|
||||
if let Some(trait_ref) = trait_ref {
|
||||
v.process_path(trait_ref.hir_ref_id, &hir::QPath::Resolved(None, &trait_ref.path));
|
||||
}
|
||||
v.process_generic_params(generics, "", item.hir_id);
|
||||
|
@ -1082,7 +1082,7 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
);
|
||||
}
|
||||
|
||||
if let &Some(ref default_ty) = default_ty {
|
||||
if let Some(default_ty) = default_ty {
|
||||
self.visit_ty(default_ty)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue