-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
The description "if the state is Published, we want to return the value in the post’s content field; otherwise, we want to return an empty string slice, as shown in Listing 17-17:" in chapter 17.3 seems "prematurely specific" for the content of Listing 17.17, which only shows that the Post content method is now delegating to a new content method on State (nothing yet about an empty string slice):

Also (separate issue but nearby in the text), this is arguably a little inaccurate because it sounds like it implies that calling request_review on a Draft returns self, which isn't true (it returns a PendingReview): "Similar to request_review, if we call the approve method on a Draft, it will have no effect because it will return self". I guess the "similarity" would be that calling request_review on a PendingReview returns self, but it doesn't really read that way