Ignore attributes that aren't Meta::Lists.

This commit is contained in:
Jimmy Cuadra 2018-05-19 01:13:07 -07:00
parent 4bc916556f
commit 1678ee2cea
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ pub fn strip_serde_attrs(field: &Field) -> Field {
let meta_list = match meta {
Meta::List(meta_list) => meta_list,
_ => panic!("expected Meta::List"),
_ => return true,
};
if meta_list.ident.as_ref() != "serde" {

View File

@ -109,7 +109,7 @@ impl From<Vec<Field>> for Request {
let meta_list = match meta {
Meta::List(meta_list) => meta_list,
_ => panic!("expected Meta::List"),
_ => return true,
};
if meta_list.ident.as_ref() != "ruma_api" {

View File

@ -91,7 +91,7 @@ impl From<Vec<Field>> for Response {
let meta_list = match meta {
Meta::List(meta_list) => meta_list,
_ => panic!("expected Meta::List"),
_ => return true,
};
if meta_list.ident.as_ref() != "ruma_api" {