mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01: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({
|
jsConversion = string.Template(template).substitute({
|
||||||
"val": "value",
|
"val": "value",
|
||||||
"valPtr": None,
|
"valPtr": None,
|
||||||
"declName": "retval",
|
|
||||||
"holderName": None,
|
"holderName": None,
|
||||||
})
|
})
|
||||||
jsConversion = CGWrapper(CGGeneric(jsConversion),
|
jsConversion = CGWrapper(CGGeneric(jsConversion), pre="Ok(Some(", post="))")
|
||||||
pre="let retval;\nretval = ",
|
|
||||||
post=";\nOk(Some(retval))")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"name": name,
|
"name": name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue