nouveau/headers: Run rustfmt on generated files

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28255>
This commit is contained in:
Daniel Almeida 2024-07-18 10:52:59 -05:00 committed by Marge Bot
parent 2f6919e6c2
commit 591b5da49b

View file

@ -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