Skip to content

Commit

Permalink
Merge #180
Browse files Browse the repository at this point in the history
180: Fix comments r=matklad a=muramasa8191

# Fix comments

The example of `get_mut` looks like that for `new`.
Actually,  the comment before the example finishes with ':'. So, it looks like in the middle of sentence or incomplete.

Co-authored-by: Masa Tamura <muramasa8191@gmail.com>
  • Loading branch information
bors[bot] and muramasa8191 committed May 30, 2022
2 parents 9879c77 + a36132d commit 485aaa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ pub mod unsync {
///
/// let mut cell: OnceCell<u32> = OnceCell::new();
/// cell.set(92).unwrap();
/// cell = OnceCell::new();
/// *cell.get_mut().unwrap() = 93;
/// assert_eq!(cell.get(), Some(&93));
/// ```
pub fn get_mut(&mut self) -> Option<&mut T> {
// Safe because we have unique access
Expand Down

0 comments on commit 485aaa8

Please sign in to comment.