Migrate ff_derive to proc-macro2 1.0
This commit is contained in:
@@ -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()),
|
||||
_ => {
|
||||
|
||||
Reference in New Issue
Block a user