servo: Merge #9871 - tidy fix for longer single line imports (from creativcoder:fix-tidy-single-import); r=Wafflespeanut

Fixes #9864

Source-Repo: https://github.com/servo/servo
Source-Revision: 41864c4524d6303a6aa21e99bf67d4026c135900
This commit is contained in:
Rahul Sharma
2016-03-08 00:36:08 +05:00
parent fc5a31fd1a
commit 4fdc94bf18

View File

@@ -366,7 +366,7 @@ def check_rust(file_name, lines):
if line.startswith("use "):
import_block = True
indent = len(original_line) - len(line)
if not line.endswith(";"):
if not line.endswith(";") and '{' in line:
yield (idx + 1, "use statement spans multiple lines")
# strip "use" from the begin and ";" from the end
current_use = line[4:-1]