diff options
Diffstat (limited to 'examples/automock.rs')
-rw-r--r-- | examples/automock.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/automock.rs b/examples/automock.rs index a597678..a0d638a 100644 --- a/examples/automock.rs +++ b/examples/automock.rs @@ -26,14 +26,16 @@ fn main() { let mut mock_foo = MockFoo::new(); - mock_foo - .expect_bar() - .with(eq(1234), always()) - .returning(|_, num, text| { - println!("bar was called with {num} and '{text}'"); - - 9.36f32 - }); + unsafe { + mock_foo + .expect_bar() + .with(eq(1234), always()) + .returning(|_, num, text| { + println!("bar was called with {num} and '{text}'"); + + 9.36f32 + }); + } mock_foo.bar::<f32>(1234, "Hello"); } |