mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Improve the formatting for FromJSValConvertible implementations in UnionTypes.
This commit is contained in:
parent
5b2f2c5505
commit
746c3ebd7d
1 changed files with 5 additions and 2 deletions
|
@ -3015,8 +3015,11 @@ class CGUnionConversionStruct(CGThing):
|
||||||
pre="fn from_jsval(cx: *mut JSContext, value: JSVal, _option: ()) -> Result<%s, ()> {\n" % self.type,
|
pre="fn from_jsval(cx: *mut JSContext, value: JSVal, _option: ()) -> Result<%s, ()> {\n" % self.type,
|
||||||
post="\n}")
|
post="\n}")
|
||||||
return CGWrapper(
|
return CGWrapper(
|
||||||
CGIndenter(method),
|
CGIndenter(CGList([
|
||||||
pre="impl FromJSValConvertible for %s {\ntype Config = ();\n" % self.type,
|
CGGeneric("type Config = ();"),
|
||||||
|
method,
|
||||||
|
], "\n")),
|
||||||
|
pre="impl FromJSValConvertible for %s {\n" % self.type,
|
||||||
post="\n}")
|
post="\n}")
|
||||||
|
|
||||||
def try_method(self, t):
|
def try_method(self, t):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue