mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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:
commit
1192efed50
1 changed files with 1 additions and 1 deletions
|
@ -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>")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue