Skip to content

Commit f4e0064

Browse files
It's enough for one field to be private. Closes mainmatter#69
1 parent 73d52df commit f4e0064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/src/03_ticket_v1/05_encapsulation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To enforce stricter rules, we must keep the fields private[^newtype].
2323
We can then provide public methods to interact with a `Ticket` instance.
2424
Those public methods will have the responsibility of upholding our invariants (e.g. a title must not be empty).
2525

26-
If all fields are private, it is no longer possible to create a `Ticket` instance directly using the struct
26+
If at least one field is private it is no longer possible to create a `Ticket` instance directly using the struct
2727
instantiation syntax:
2828

2929
```rust

0 commit comments

Comments
 (0)