Migrate ff_derive to proc-macro2 1.0

This commit is contained in:
Jack Grigg
2019-09-06 19:03:12 -04:00
parent 2b6fbfd2d1
commit bef3e7e336
3 changed files with 21 additions and 21 deletions

View File

@@ -91,10 +91,10 @@ fn fetch_wrapped_ident(body: &syn::Data) -> Option<syn::Ident> {
/// Fetch an attribute string from the derived struct.
fn fetch_attr(name: &str, attrs: &[syn::Attribute]) -> Option<String> {
for attr in attrs {
if let Some(meta) = attr.interpret_meta() {
if let Ok(meta) = attr.parse_meta() {
match meta {
syn::Meta::NameValue(nv) => {
if nv.ident.to_string() == name {
if nv.path.get_ident().map(|i| i.to_string()) == Some(name.to_string()) {
match nv.lit {
syn::Lit::Str(ref s) => return Some(s.value()),
_ => {