From 1628732d6514670fe2108e5063e9d5ba7166ad94 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 26 Mar 2023 17:39:27 +0200 Subject: fix: replace Self in generics --- examples/automock.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/automock.rs b/examples/automock.rs index c8725ce..a597678 100644 --- a/examples/automock.rs +++ b/examples/automock.rs @@ -3,14 +3,22 @@ use ridicule::predicate::{always, eq}; use crate::cool_trais::MockFoo; +pub trait DoStuff {} + +impl DoStuff for f32 {} + mod cool_trais { use ridicule::automock; + use crate::DoStuff; + #[automock] - pub trait Foo + pub trait Foo: Sized { - fn bar(&self, num: u128, text: &str) -> Something; + fn bar(&self, num: u128, text: &str) -> Something + where + Something: DoStuff; } } -- cgit v1.2.3-18-g5258