diff --git a/src/nouveau/headers/lib_rs_gen.py b/src/nouveau/headers/lib_rs_gen.py index 6662a28417f..b3e7de5aec5 100644 --- a/src/nouveau/headers/lib_rs_gen.py +++ b/src/nouveau/headers/lib_rs_gen.py @@ -88,6 +88,10 @@ def main(): try: with open(args.out_rs, 'w', encoding='utf-8') as f: f.write(TEMPLATE_RS.render(root=root)) + try: + subprocess.run(['rustfmt', args.out_rs], check=True) + except subprocess.CalledProcessError: + pass except Exception: # In the event there's an error, this imports some helpers from mako