diff options
Diffstat (limited to 'macros/src/util/item_impl.rs')
-rw-r--r-- | macros/src/util/item_impl.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/macros/src/util/item_impl.rs b/macros/src/util/item_impl.rs index 4bd7492..621f6be 100644 --- a/macros/src/util/item_impl.rs +++ b/macros/src/util/item_impl.rs @@ -1,15 +1,16 @@ +use proc_macro2::Ident; use syn::{ImplItem, ImplItemMethod, ItemImpl}; pub fn find_impl_method_by_name_mut<'item_impl>( item_impl: &'item_impl mut ItemImpl, - method_name: &'static str, + method_name: &Ident, ) -> Option<&'item_impl mut ImplItemMethod> { let impl_items = &mut item_impl.items; impl_items.iter_mut().find_map(|impl_item| match impl_item { ImplItem::Method(method_item) => { - if method_item.sig.ident == method_name { + if &method_item.sig.ident == method_name { Some(method_item) } else { None |