Skip to content

Commit

Permalink
Clarify this code is demonstrating usage of the library from a binary.
Browse files Browse the repository at this point in the history
…Fixes #1445.
  • Loading branch information
carols10cents committed Nov 14, 2021
1 parent 8b09da0 commit e2a45a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ch10-02-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ the specific behavior that we want the methods of the trait to have for the
particular type.

After implementing the trait, we can call the methods on instances of
`NewsArticle` and `Tweet` in the same way we call regular methods, like this:
`NewsArticle` and `Tweet` in the same way we call regular methods. Here's an
example of how a binary crate could use our library crate:

```rust,ignore
{{#rustdoc_include ../listings/ch10-generic-types-traits-and-lifetimes/no-listing-01-calling-trait-method/src/main.rs:here}}
Expand Down

0 comments on commit e2a45a1

Please sign in to comment.