Skip to content

Commit

Permalink
remove instant deref from the example
Browse files Browse the repository at this point in the history
Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
  • Loading branch information
rassvet2 and JelteF authored Apr 5, 2023
1 parent 81fc396 commit 805f4dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/unwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() {
// assert_eq!(Maybe::Nothing.unwrap_just(), /* panic */);
// assert_eq!(Maybe::Just(2).unwrap_nothing(), /* panic */);

assert_eq!(*(&Maybe::Just(42)).unwrap_just_ref(), 42);
assert_eq!(&Maybe::Just(42)).unwrap_just_ref(), &42);
}
```

Expand Down

0 comments on commit 805f4dc

Please sign in to comment.