Auto merge of #7945 - pierrechevalier83:fix_issue_7914, r=jdm

Refactor away unnecessary use of regex

We don't need regex matching since ": &Vec<" doesn't
contain any special character.

New code reads better.

Fixes #7914.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7945)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-09 21:22:06 -06:00
commit 1192efed50

View file

@ -351,7 +351,7 @@ def check_rust(file_name, contents):
mods = []
# There should not be any extra pointer dereferencing
if re.search(r": &Vec<", line) is not None:
if ": &Vec<" in line:
yield (idx + 1, "use &[T] instead of &Vec<T>")