]> git.lizzy.rs Git - rust.git/commitdiff
Rename variable
authorMichael Wright <mikerite@lavabit.com>
Thu, 18 Jan 2018 05:52:24 +0000 (07:52 +0200)
committerMichael Wright <mikerite@lavabit.com>
Thu, 18 Jan 2018 05:52:24 +0000 (07:52 +0200)
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

index e5109cf3ebb3d6ea080cef6bd6e88567f069b070..d10199c992d9c698c3004982ad77517dc59fb674 100644 (file)
@@ -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;