From 0b18dddb42e99fb7ccd30a7ada4cb05938224967 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Fri, 11 Nov 2016 10:39:04 -0500 Subject: [PATCH] Correct code example to illustrate generics --- src/ch10-02-traits.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch10-02-traits.md b/src/ch10-02-traits.md index a6aff3418..9369826b2 100644 --- a/src/ch10-02-traits.md +++ b/src/ch10-02-traits.md @@ -146,8 +146,8 @@ imagine we had a function that wanted to call `print` for any type that supports printing. We could write it like this: ```rust,ignore -fn print(value: v) { - v.print(); +fn print(value: T) { + value.print(); } ```