summaryrefslogtreecommitdiff
path: root/macros/src/expectation.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-18 18:26:53 +0100
committerHampusM <hampus@hampusmat.com>2023-03-18 18:26:53 +0100
commit43e0bdb4cc598f199eacb63f755f30dc2108146b (patch)
tree66f6bfc7fff793e2b267564fc05db4494a9ca2af /macros/src/expectation.rs
parentc48271aef7e6b0819c497f302127c161845a83d7 (diff)
feat: parse impl in mock macro as actual impl block
Diffstat (limited to 'macros/src/expectation.rs')
-rw-r--r--macros/src/expectation.rs4
1 files changed, 2 insertions, 2 deletions
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);