Skip to content

Commit

Permalink
Fix application decoding w/ rpc_origins
Browse files Browse the repository at this point in the history
rpc_origins is no longer sent, so fallback to an empty Vec if it's
not present.
  • Loading branch information
Austin Hellyer committed Jan 20, 2017
1 parent 147cf01 commit 38db32e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ impl {0} {{
format!(r#"try!(remove(&mut map, "{}").and_then(into_string))"#,
field_name)
},
("string", false, true, Some(def), None, None, None) => {
format!(r#"try!(opt(&mut map, "{}", |v| decode_array(v, into_string))).unwrap_or({})"#,
field_name,
def)
},
("string", false, true, None, None, None, None) => {
format!(r#"try!(remove(&mut map, "{}").and_then(|v| decode_array(v, into_string)))"#,
field_name)
Expand Down
1 change: 1 addition & 0 deletions definitions/structs/current_application_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ fields:
type: User
- name: rpc_origins
array: true
default: Vec::default()
type: string

0 comments on commit 38db32e

Please sign in to comment.