Ignore attributes that aren't Meta::List
s.
This commit is contained in:
parent
4bc916556f
commit
1678ee2cea
@ -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" {
|
||||
|
@ -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" {
|
||||
|
@ -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" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user