From 774a9f3769459d87eb765d9cc6864747d128ac33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BClker?= Date: Sun, 25 May 2025 17:32:48 +0200 Subject: [PATCH] Cleanup keyword handling in CodegenRust.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon Wülker --- components/script_bindings/codegen/CodegenRust.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/script_bindings/codegen/CodegenRust.py b/components/script_bindings/codegen/CodegenRust.py index fa4412ee290..c9dba552bd7 100644 --- a/components/script_bindings/codegen/CodegenRust.py +++ b/components/script_bindings/codegen/CodegenRust.py @@ -6761,10 +6761,9 @@ class CGInterfaceTrait(CGThing): yield name, arguments, rettype, False def fmt(arguments, leadingComma=True): - keywords = {"async"} prefix = "" if not leadingComma else ", " return prefix + ", ".join( - f"{name if name not in keywords else f'r#{name}'}: {type_}" + f"r#{name}: {type_}" for name, type_ in arguments )