1
0
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:
Luca Palmieri
2025-07-07 17:24:23 +02:00
committed by GitHub
parent 3fe14761e3
commit 294c216eb9

View File

@ -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`!