diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-27 04:48:38 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-27 04:48:38 +0530 |
commit | f96e8ce9e8c0a2c9de9574f538718defdcd93c11 (patch) | |
tree | 3605399b0f796ecd9505c2d9a79beaad96a53dae /python | |
parent | f5ef2f4f75cd58a3c6f1f123e413dc9d3a24f841 (diff) | |
parent | df49cf2b132ae89ac71f316efd2e40a6f74dab2c (diff) | |
download | servo-f96e8ce9e8c0a2c9de9574f538718defdcd93c11.tar.gz servo-f96e8ce9e8c0a2c9de9574f538718defdcd93c11.zip |
Auto merge of #8685 - jmr0:master, r=Ms2ger
tidy rule to warn against use of &String and refactoring
Fixes #8681
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8685)
<!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r-- | python/tidy.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/tidy.py b/python/tidy.py index dd2ef9d29cc..499fb8c5efc 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -369,6 +369,10 @@ def check_rust(file_name, contents): if ": &Vec<" in line: yield (idx + 1, "use &[T] instead of &Vec<T>") + # No benefit over using &str + if ": &String" in line: + yield (idx + 1, "use &str instead of &String") + # Avoid flagging <Item=Foo> constructs def is_associated_type(match, line, index): |