diff options
author | HampusM <hampus@hampusmat.com> | 2023-03-19 18:06:28 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-03-19 18:06:28 +0100 |
commit | f73c3218b9a004fb405386ce2623d2dfa077388c (patch) | |
tree | 5e8a43741ac00e7f265e45d64fa3d1afdfe367f6 /examples | |
parent | ad2a6d1dc517407939ed022bba9f3352efc678ce (diff) |
fix: allow mocking methods taking &mut self
Diffstat (limited to 'examples')
-rw-r--r-- | examples/generic_method.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/generic_method.rs b/examples/generic_method.rs index 995c67d..4262ee2 100644 --- a/examples/generic_method.rs +++ b/examples/generic_method.rs @@ -5,6 +5,8 @@ use ridicule::mock; trait Foo { fn bar<Baz: Display>(&self, num: u128) -> Baz; + + fn abc<Baz: Display>(&mut self, baz: Baz); } mock! { @@ -13,6 +15,8 @@ mock! { impl Foo for MockFoo { fn bar<Baz: Display>(&self, num: u128) -> Baz; + + fn abc<Baz: Display>(&mut self, baz_baz: Baz); } } |