book icon indicating copy to clipboard operation
book copied to clipboard

Confusing sentence

Open seishun opened this issue 2 years ago • 0 comments
trafficstars

  • 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"?

seishun avatar May 05 '23 15:05 seishun