From 77d68b1be3d041b0b2f38df854d497240143740a Mon Sep 17 00:00:00 2001 From: CoDeus <121677503+Coddeus@users.noreply.github.com> Date: Tue, 18 Apr 2023 09:08:11 +0200 Subject: [PATCH] Fixed typo --- solutions/generics-traits/trait-object.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/generics-traits/trait-object.md b/solutions/generics-traits/trait-object.md index 0bdd67e..5b3409b 100644 --- a/solutions/generics-traits/trait-object.md +++ b/solutions/generics-traits/trait-object.md @@ -37,13 +37,13 @@ fn main() { let bird = hatch_a_bird(2); // this bird has forgotten how to swim, so below line will cause an error // bird.swim(); - // but it can quak + // but it can quack assert_eq!(bird.quack(), "duck duck"); let bird = hatch_a_bird(1); // this bird has forgotten how to fly, so below line will cause an error // bird.fly(); - // but it can quak too + // but it can quack too assert_eq!(bird.quack(), "swan swan"); println!("Success!") @@ -95,7 +95,7 @@ fn main() { for bird in birds { bird.quack(); - // when duck and swan turns into Bird, they all forgot how to fly, only remember how to quack + // when duck and swan turn into Bird, they all forget how to fly, and only remember how to quack // so, the below code will cause an error // bird.fly(); } @@ -223,4 +223,4 @@ fn main() { my_function(Box::new(13_u32)); my_function(Box::new(String::from("abc"))); } -``` \ No newline at end of file +```