servo: Merge #8685 - tidy rule to warn against use of &String and refactoring (from jmr0:master); r=Ms2ger
Fixes #8681 Source-Repo: https://github.com/servo/servo Source-Revision: f96e8ce9e8c0a2c9de9574f538718defdcd93c11
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user