You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-08-08 16:26:35 +02:00
Update src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
This commit is contained in:
@ -36,7 +36,7 @@ impl DerefMut for Username {
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
- `DerefMut` allows users to get a mutable reference to the wrapped type.
|
- `DerefMut` allows users to get a mutable reference to the wrapped value.
|
||||||
|
|
||||||
The mutable reference can be used to modify the underlying data in ways that
|
The mutable reference can be used to modify the underlying data in ways that
|
||||||
may violate the invariants enforced by `Username::new`!
|
may violate the invariants enforced by `Username::new`!
|
||||||
|
Reference in New Issue
Block a user