aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorPiotr Szpetkowski <piotr.szpetkowski@pyquest.space>2019-01-30 20:54:12 +0100
committerPiotr Szpetkowski <piotr.szpetkowski@pyquest.space>2019-01-30 20:54:12 +0100
commitabd577bfd4583de268aff26e70b480e397504d70 (patch)
treef7dee8484999cd20c330077bc419de69039ed9a8 /components/script/dom/bindings/codegen/CodegenRust.py
parent65370f17c98225f7e71c72ea2e0cb2d0a81487f3 (diff)
downloadservo-abd577bfd4583de268aff26e70b480e397504d70.tar.gz
servo-abd577bfd4583de268aff26e70b480e397504d70.zip
Update bool pattern matching into if-else
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index e7399d66307..1db23e50992 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -6399,13 +6399,10 @@ class CGDictionary(CGThing):
conversion = (
"{\n"
" rooted!(in(cx) let mut rval = UndefinedValue());\n"
- " match r#try!(get_dictionary_property(cx, object.handle(), \"%s\", rval.handle_mut())) {\n"
- " true => {\n"
+ " if r#try!(get_dictionary_property(cx, object.handle(), \"%s\", rval.handle_mut())) {\n"
"%s\n"
- " },\n"
- " false => {\n"
+ " } else {\n"
"%s\n"
- " },\n"
" }\n"
"}") % (member.identifier.name, indent(conversion), indent(default))