From c6a54ce9a959527cefe94b182b8ce4b00f7826ea Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 31 Jan 2023 21:08:09 +0100 Subject: [PATCH] Show the pair returned by `duplicate` (#314) This makes it easier to talk about the code as you make changes to the `duplicate` function. --- src/generics/trait-bounds.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generics/trait-bounds.md b/src/generics/trait-bounds.md index 47e33083..adbd0af0 100644 --- a/src/generics/trait-bounds.md +++ b/src/generics/trait-bounds.md @@ -13,12 +13,13 @@ fn duplicate(a: T) -> (T, T) { fn main() { let foo = String::from("foo"); let pair = duplicate(foo); + println!("{pair:?}"); } ```
-Consider showing a `where` clause syntax. Students can encounter it too when reading code. +Show a `where` clause, students will encounter it when reading code. ```rust,ignore fn duplicate(a: T) -> (T, T)