mirror of
https://github.com/servo/servo.git
synced 2025-06-10 09:33:13 +00:00
Remove the 'retval' local variable from union TryConvertTo methods.
This commit is contained in:
parent
05d0ba783f
commit
66c89f27aa
1 changed files with 1 additions and 4 deletions
|
@ -2914,12 +2914,9 @@ def getUnionTypeTemplateVars(type, descriptorProvider):
|
|||
jsConversion = string.Template(template).substitute({
|
||||
"val": "value",
|
||||
"valPtr": None,
|
||||
"declName": "retval",
|
||||
"holderName": None,
|
||||
})
|
||||
jsConversion = CGWrapper(CGGeneric(jsConversion),
|
||||
pre="let retval;\nretval = ",
|
||||
post=";\nOk(Some(retval))")
|
||||
jsConversion = CGWrapper(CGGeneric(jsConversion), pre="Ok(Some(", post="))")
|
||||
|
||||
return {
|
||||
"name": name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue