diff options
Diffstat (limited to 'python/tidy.py')
-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): |