From: Ralf Jung Date: Wed, 23 Jan 2019 20:40:24 +0000 (+0100) Subject: fix inconsistencies in part02 X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/88cd95d43aa7327670f1253a26d2a9b79cc945c4?ds=sidebyside;hp=cfb905da7555e4ec4a8f1acd09bd7813607aa653 fix inconsistencies in part02 --- diff --git a/src/part02.rs b/src/part02.rs index a97c367..a24a9d0 100644 --- a/src/part02.rs +++ b/src/part02.rs @@ -77,7 +77,7 @@ pub trait Minimum : Copy { //@ Next, we write `vec_min` as a generic function over a type `T` that we demand to satisfy the `Minimum` trait. //@ This requirement is called a *trait bound*. //@ The only difference to the version from the previous part is that we call `e.min(n)` instead -//@ of `std::cmp::min(n, e)`. Rust automatically figures out that `n` is of type `T`, which implements +//@ of `min_i32(n, e)`. Rust automatically figures out that `e` is of type `T`, which implements //@ the `Minimum` trait, and hence we can call that function. //@ //@ There is a crucial difference to templates in C++: We actually have to declare which traits