summaryrefslogtreecommitdiff
path: root/examples/generic_method.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-19 18:06:28 +0100
committerHampusM <hampus@hampusmat.com>2023-03-19 18:06:28 +0100
commitf73c3218b9a004fb405386ce2623d2dfa077388c (patch)
tree5e8a43741ac00e7f265e45d64fa3d1afdfe367f6 /examples/generic_method.rs
parentad2a6d1dc517407939ed022bba9f3352efc678ce (diff)
fix: allow mocking methods taking &mut self
Diffstat (limited to 'examples/generic_method.rs')
-rw-r--r--examples/generic_method.rs4
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);
}
}