зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4bdf8a7018
Коммит
90e2b2cb80
|
@ -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]
|
||||
|
|
Загрузка…
Ссылка в новой задаче