Skip to content

Confusing sentence #3635

@seishun

Description

@seishun
  • I have searched open and closed issues and pull requests for duplicates, using these search terms:
    • state field of Option
  • I have checked the latest main branch to see if this has already been fixed, in this file:
    • src/ch17-03-oo-design-patterns.md

URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/stable/book/ch17-03-oo-design-patterns.html#trade-offs-of-the-state-pattern

Description of the problem:

Both methods delegate to the implementation of the same method on the value in the state field of Option and set the new value of the state field to the result.

It's not clear what "of Option" means. state is not a field of Option.

Suggested fix:

Drop the "of Option"?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions