Correct code example to illustrate generics

This commit is contained in:
Carol (Nichols || Goulding)
2016-11-11 10:39:04 -05:00
parent 77fc0ed4f7
commit 0b18dddb42
+2 -2
View File
@@ -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<T>(value: T) {
value.print();
}
```