mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Cleanup keyword handling in CodegenRust.py
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
0258783df8
commit
774a9f3769
1 changed files with 1 additions and 2 deletions
|
@ -6761,10 +6761,9 @@ class CGInterfaceTrait(CGThing):
|
||||||
yield name, arguments, rettype, False
|
yield name, arguments, rettype, False
|
||||||
|
|
||||||
def fmt(arguments, leadingComma=True):
|
def fmt(arguments, leadingComma=True):
|
||||||
keywords = {"async"}
|
|
||||||
prefix = "" if not leadingComma else ", "
|
prefix = "" if not leadingComma else ", "
|
||||||
return prefix + ", ".join(
|
return prefix + ", ".join(
|
||||||
f"{name if name not in keywords else f'r#{name}'}: {type_}"
|
f"r#{name}: {type_}"
|
||||||
for name, type_ in arguments
|
for name, type_ in arguments
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue