diff options
author | HampusM <hampus@hampusmat.com> | 2023-04-02 20:41:34 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-04-02 20:41:34 +0200 |
commit | b1e5359bf34fba4392634f7a7ec43964b53f96a4 (patch) | |
tree | 87d83c5e88901d86ca444e2894f47ecd391a2e7a | |
parent | 5eb823896f01146df0d4ed6c296ef7dd445ccbbf (diff) |
docs: fix the mock macro example
-rw-r--r-- | macros/src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 13037e4..8783838 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -63,9 +63,11 @@ mod util; /// { /// let mut mock_foo = MockFoo::new(); /// -/// mock_foo -/// .expect_bar() -/// .returning(|foo, a: u32| format!("Hello {a}")); +/// unsafe { +/// mock_foo +/// .expect_bar() +/// .returning(|foo, a: u32| format!("Hello {a}")); +/// } /// /// assert_eq!(mock_foo.bar::<u32, String>(123), "Hello 123"); /// } |