Skip to content

Commit

Permalink
Update training-slides/src/shared-mutability.md
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Pallant <[email protected]>
  • Loading branch information
miguelraz and jonathanpallant authored Mar 5, 2024
1 parent b97efc1 commit 5757c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion training-slides/src/shared-mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ struct Post {

impl Post {
fn date_of_first_view(&self) -> Instant {
*self.first_viewed_at.get_or_init(|| {Instant::now()})
*self.first_viewed_at.get_or_init(Instant::now)
}
}
```

0 comments on commit 5757c8d

Please sign in to comment.