1
Fork 0

Rollup merge of #135762 - TomFryersMidsummer:patch-1, r=joboet

Correct counting to four in cell module docs

It could also be argued that `OnceCell<T>` and `LazyCell<T>` don't really provide safe interior mutability in different ways. But it's a vague enough claim that I'm not sure it's worth being pedantic about.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-20 21:45:06 +08:00 committed by GitHub
commit ecfb55762c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,8 +22,8 @@
//! (mutable via `&T`), in contrast with typical Rust types that exhibit 'inherited mutability'
//! (mutable only via `&mut T`).
//!
//! Cell types come in three flavors: `Cell<T>`, `RefCell<T>`, and `OnceCell<T>`. Each provides
//! a different way of providing safe interior mutability.
//! Cell types come in four flavors: `Cell<T>`, `RefCell<T>`, `OnceCell<T>`, and `LazyCell<T>`.
//! Each provides a different way of providing safe interior mutability.
//!
//! ## `Cell<T>`
//!