From 39d0588c89bd7a25e45cb96874622857d34eb6bb Mon Sep 17 00:00:00 2001 From: Nicole L Date: Thu, 26 Jun 2025 12:07:50 -0700 Subject: [PATCH] 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. --- src/methods-and-traits/traits/implementing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/methods-and-traits/traits/implementing.md b/src/methods-and-traits/traits/implementing.md index b091088f..913c73ad 100644 --- a/src/methods-and-traits/traits/implementing.md +++ b/src/methods-and-traits/traits/implementing.md @@ -22,6 +22,7 @@ impl Pet for Dog { fn main() { let fido = Dog { name: String::from("Fido"), age: 5 }; + dbg!(fido.talk()); fido.greet(); } ```