If we were to create an alternative implementation that didn’t use the state pattern, we might instead use match expressions in the methods on Post or even in the main code that checks the state of the post and changes behavior in those places.
The only valid subject for "checks" and "changes" is "the main code", but then it's unclear how we would use match expressions in the methods on Post and what "those places" refers to.
main
branch to see if this has already been fixedURL to the section(s) of the book with this problem: https://rust-book.cs.brown.edu/ch17-03-oo-design-patterns.html#trade-offs-of-the-state-pattern
Description of the problem:
The only valid subject for "checks" and "changes" is "the main code", but then it's unclear how we would use match expressions in the methods on
Post
and what "those places" refers to.Suggested fix:
Change to "check" and "change"?