Update bool pattern matching into if-else

This commit is contained in:
Piotr Szpetkowski 2019-01-30 20:54:12 +01:00
parent 65370f17c9
commit abd577bfd4
No known key found for this signature in database
GPG key ID: D3FEC6AE666BC5B1
5 changed files with 50 additions and 49 deletions

View file

@ -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))