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.
This commit is contained in:
Michael Wright 2018-01-18 07:52:24 +02:00
parent d13af87d8a
commit bf7efead17

View 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;