Skip to content

Chapter 18 part 3: fix incorrect implication about constructing Posts#4744

Open
DanielEScherzer wants to merge 1 commit intorust-lang:mainfrom
DanielEScherzer:ch-18-pt-3-constructing
Open

Chapter 18 part 3: fix incorrect implication about constructing Posts#4744
DanielEScherzer wants to merge 1 commit intorust-lang:mainfrom
DanielEScherzer:ch-18-pt-3-constructing

Conversation

@DanielEScherzer
Copy link
Copy Markdown

The fact that state is private means that there is no way for code outside of the defining module to create a Post any way other than using ::new(). It is still possible for code within the module to construct instances. Clarify that code using the library cannot create a Post with any other starting state.

The fact that `state` is private means that there is no way *for code outside
of the defining module* to create a `Post` any way other than using `::new()`.
It is still possible for code within the module to construct instances. Clarify
that code using the library cannot create a `Post` with any other starting
state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant