Skip to content

Commit 39d0588

Browse files
authored
Add direct call to talk in trait implementation slide (#2787)
I think it'd be helpful to also show a direct call to `talk`, so that it's clear that both trait methods can be called directly.
1 parent da28a50 commit 39d0588

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/methods-and-traits/traits/implementing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ impl Pet for Dog {
2222
2323
fn main() {
2424
let fido = Dog { name: String::from("Fido"), age: 5 };
25+
dbg!(fido.talk());
2526
fido.greet();
2627
}
2728
```

0 commit comments

Comments
 (0)