From bf7efead17dcb685cff8c7696f1ba6f7c28a82f1 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Thu, 18 Jan 2018 07:52:24 +0200 Subject: [PATCH] Rename variable Rename `vec` to `ty` in `match_type_parameter`. This variable is a type and not a vector. Previously it would only refer to `Vec<_>` so the name used to make sense. --- clippy_lints/src/types.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index e5109cf3ebb..d10199c992d 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -182,9 +182,9 @@ fn match_type_parameter(cx: &LateContext, qpath: &QPath, path: &[&str]) -> bool if_chain! { if let Some(ref params) = last.parameters; if !params.parenthesized; - if let Some(vec) = params.types.get(0); - if let TyPath(ref qpath) = vec.node; - if let Some(did) = opt_def_id(cx.tables.qpath_def(qpath, cx.tcx.hir.node_to_hir_id(vec.id))); + if let Some(ty) = params.types.get(0); + if let TyPath(ref qpath) = ty.node; + if let Some(did) = opt_def_id(cx.tables.qpath_def(qpath, cx.tcx.hir.node_to_hir_id(ty.id))); if match_def_path(cx.tcx, did, path); then { return true;