@@ -382,8 +382,8 @@ def set(key, value):
382382top_level_keys = []
383383
384384for line in open(rust_dir + '/config.toml.example').read().split("\n"):
385- if cur_section == None:
386- if line.count('=') == 1:
385+ if cur_section == None:
386+ if line.count('=') == 1:
387387 top_level_key = line.split('=')[0]
388388 top_level_key = top_level_key.strip(' #')
389389 top_level_keys.append(top_level_key)
@@ -465,20 +465,19 @@ def configure_section(lines, config):
465465 raise RuntimeError("failed to find config line for {}".format(key))
466466
467467
468- def configure_top_level_key(lines, top_level_key, value):
469- for i, line in enumerate(lines):
470- if line.startswith('#' + top_level_key + ' = ') or line.startswith(top_level_key + ' = '):
468+ def configure_top_level_key(lines, top_level_key, value):
469+ for i, line in enumerate(lines):
470+ if line.startswith('#' + top_level_key + ' = ') or line.startswith(top_level_key + ' = '):
471471 lines[i] = "{} = {}".format(top_level_key, value)
472- return
473-
472+ return
473+
474474 raise RuntimeError("failed to find config line for {}".format(top_level_key))
475475
476-
476+
477477for section_key, section_config in config.items():
478- if section_key not in sections and section_key not in top_level_keys:
478+ if section_key not in sections and section_key not in top_level_keys:
479479 raise RuntimeError("config key {} not in sections or top_level_keys".format(section_key))
480-
481- if section_key in top_level_keys:
480+ if section_key in top_level_keys:
482481 configure_top_level_key(sections[None], section_key, section_config)
483482
484483 elif section_key == 'target':
0 commit comments