diff options
author | Pierre Chevalier <pierrechevalier83@gmail.com> | 2015-10-09 16:39:18 +0100 |
---|---|---|
committer | Pierre Chevalier <pierrechevalier83@gmail.com> | 2015-10-09 16:43:26 +0100 |
commit | d2481c37d5ff0da67b86f09aa23cd9decad7cafe (patch) | |
tree | 170a9997e49fd8a6c1c7a42bdf5751fe9ade3aa4 /python | |
parent | 1029feb55d004e4417dd6cfdcb864d18871ae74a (diff) | |
download | servo-d2481c37d5ff0da67b86f09aa23cd9decad7cafe.tar.gz servo-d2481c37d5ff0da67b86f09aa23cd9decad7cafe.zip |
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.
Diffstat (limited to 'python')
-rw-r--r-- | python/tidy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/tidy.py b/python/tidy.py index 93b30e147f9..432814e8f93 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -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>") |