Skip to content

Commit a75258f

Browse files
authored
Update cell.rs, clarified Cell<T> in module level doc
Specifically, removed statement regarding at most one references to inner value, as Cell<T>'s interface is designed to prevent the existence of any reference to Cell<T>'s inner value.
1 parent 0439b89 commit a75258f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

library/core/src/cell.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
//! ## `Cell<T>`
2929
//!
3030
//! [`Cell<T>`] implements interior mutability by moving values in and out of the cell. That is, an
31-
//! `& T` to the inner value can never be obtained, and the value itself cannot be directly
32-
//! obtained without replacing it with something else. Both of these rules ensure that there is
33-
//! never more than one mutable reference pointing to the inner value. This type provides the following
31+
//! `&T` to the inner value can never be obtained, and the value itself cannot be directly
32+
//! obtained without replacing it with something else. This type provides the following
3433
//! methods:
3534
//!
3635
//! - For types that implement [`Copy`], the [`get`](Cell::get) method retrieves the current

0 commit comments

Comments
 (0)