summaryrefslogtreecommitdiff
path: root/src/container.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/container.rs')
-rw-r--r--src/container.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/container.rs b/src/container.rs
index 667992c..88f1152 100644
--- a/src/container.rs
+++ b/src/container.rs
@@ -120,7 +120,10 @@ impl Container {
let error = ast
.attrs
.iter()
- .find(|attr| attr.path.is_ident(&Ident::new("error", Span::call_site())))
+ .find(|attr| {
+ attr.path()
+ .is_ident(&Ident::new("error", Span::call_site()))
+ })
.cloned();
Container {
@@ -326,7 +329,7 @@ impl From<&Field> for FieldInfo {
.as_ref()
.map_or_else(|| Ident::new("_", Span::call_site()), |s| s.clone());
for attr in &field.attrs {
- let ident = match attr.path.get_ident() {
+ let ident = match attr.path().get_ident() {
Some(ident) => ident.to_string(),
None => continue,
};
@@ -476,8 +479,8 @@ fn get_field_parser(f: &FieldInfo, asn1_type: Asn1Type, custom_errors: bool) ->
}
fn get_attribute_meta(attr: &Attribute) -> Result<TokenStream, syn::Error> {
- if let Ok(Meta::List(meta)) = attr.parse_meta() {
- let content = &meta.nested;
+ if let Meta::List(meta) = &attr.meta {
+ let content = &meta.tokens;
Ok(quote! { #content })
} else {
Err(syn::Error::new(