From 43e0bdb4cc598f199eacb63f755f30dc2108146b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 18 Mar 2023 18:26:53 +0100 Subject: feat: parse impl in mock macro as actual impl block --- macros/src/expectation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'macros/src/expectation.rs') diff --git a/macros/src/expectation.rs b/macros/src/expectation.rs index ff3d192..4fc1451 100644 --- a/macros/src/expectation.rs +++ b/macros/src/expectation.rs @@ -13,6 +13,7 @@ use syn::{ GenericArgument, GenericParam, Generics, + ImplItemMethod, ItemStruct, Lifetime, Path, @@ -20,7 +21,6 @@ use syn::{ Receiver, ReturnType, Token, - TraitItemMethod, Type, TypeBareFn, TypePath, @@ -60,7 +60,7 @@ pub struct Expectation impl Expectation { - pub fn new(mock: &Ident, item_method: &TraitItemMethod) -> Self + pub fn new(mock: &Ident, item_method: &ImplItemMethod) -> Self { let ident = create_expectation_ident(mock, &item_method.sig.ident); -- cgit v1.2.3-18-g5258