diff options
Diffstat (limited to 'examples/basic.rs')
-rw-r--r-- | examples/basic.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/basic.rs b/examples/basic.rs index 01688f5..189b45a 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -19,12 +19,14 @@ 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}'"); - }); + unsafe { + mock_foo + .expect_bar() + .with(eq(1234), always()) + .returning(|_, num, text| { + println!("bar was called with {num} and '{text}'"); + }); + } mock_foo.bar(1234, "Hello"); } |