Fix 1.34.2 incompatibility from last commit

This commit is contained in:
Jonas Platte 2019-11-18 00:06:46 +01:00
parent 41c1a224c2
commit 6ea5b9b7a1
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -51,7 +51,7 @@ impl TryFrom<RawMetadata> for Metadata {
_ => return Err(syn::Error::new_spanned(expr, "expected a string literal")),
},
"method" => match expr {
Expr::Path(ExprPath { path, .. }) if path.segments.len() == 1 => {
Expr::Path(ExprPath { ref path, .. }) if path.segments.len() == 1 => {
method = Some(path.segments[0].ident.clone());
}
_ => return Err(syn::Error::new_spanned(expr, "expected an identifier")),