Skip to content

Commit

Permalink
We've defined the signatures, not behaviors. Fixes #2917
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Nov 15, 2021
1 parent 1056768 commit cb1eb1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ch10-02-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ one per line and each line ends in a semicolon.

### Implementing a Trait on a Type

Now that we’ve defined the desired behavior using the `Summary` trait, we can
implement it on the types in our media aggregator. Listing 10-13 shows an
implementation of the `Summary` trait on the `NewsArticle` struct that uses the
headline, the author, and the location to create the return value of
Now that we’ve defined the desired signatures of the `Summary` trait's methods,
we can implement it on the types in our media aggregator. Listing 10-13 shows
an implementation of the `Summary` trait on the `NewsArticle` struct that uses
the headline, the author, and the location to create the return value of
`summarize`. For the `Tweet` struct, we define `summarize` as the username
followed by the entire text of the tweet, assuming that tweet content is
already limited to 280 characters.
Expand Down

0 comments on commit cb1eb1d

Please sign in to comment.