added tidy check for -> ()

This commit is contained in:
lucantrop 2017-03-13 13:13:46 +01:00
parent 94c344a014
commit b1faaa15dc
3 changed files with 4 additions and 1 deletions

View file

@ -565,6 +565,8 @@ def check_rust(file_name, lines):
# This particular pattern is not reentrant-safe in script_thread.rs
(r"match self.documents.borrow", "use a separate variable for the match expression",
lambda match, line: file_name.endswith('script_thread.rs')),
# -> () is unnecessary
(r"-> \(\)", "encountered function signature with -> ()", no_filter),
]
for pattern, message, filter_func in regex_rules: