Skip to content

Commit

Permalink
Auto merge of #7945 - pierrechevalier83:fix_issue_7914, r=jdm
Browse files Browse the repository at this point in the history
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 -->
  • Loading branch information
bors-servo committed Oct 10, 2015
2 parents 28969f1 + d2481c3 commit 1192efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>")


Expand Down

0 comments on commit 1192efe

Please sign in to comment.