corrected Cell<T> module level doc
replaced `&mut T` with `&T` to finally state "a &T to the inner value can never be obtained"
This commit is contained in:
parent
7e4b8d702f
commit
d056f59704
1 changed files with 3 additions and 4 deletions
|
|
@ -27,10 +27,9 @@
|
|||
//!
|
||||
//! ## `Cell<T>`
|
||||
//!
|
||||
//! [`Cell<T>`] implements interior mutability by moving values in and out of the cell. That is, an
|
||||
//! `&mut T` to the inner value can never be obtained, and the value itself cannot be directly
|
||||
//! obtained without replacing it with something else. Both of these rules ensure that there is
|
||||
//! never more than one reference pointing to the inner value. This type provides the following
|
||||
//! [`Cell<T>`] implements interior mutability by moving values in and out of the cell. That is, a
|
||||
//! `&T` to the inner value can never be obtained, and the value itself cannot be directly
|
||||
//! obtained without replacing it with something else. This type provides the following
|
||||
//! methods:
|
||||
//!
|
||||
//! - For types that implement [`Copy`], the [`get`](Cell::get) method retrieves the current
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue