From: Ralf Jung Date: Fri, 19 Jun 2015 20:51:00 +0000 (+0200) Subject: extend ex01.1 hint X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/d377bcf41f66436b2f43771910dc8fae1a3cff6a?ds=inline;hp=d49bdd82f74a5e272982a1eb2163e1886d522bf4 extend ex01.1 hint --- diff --git a/src/part01.rs b/src/part01.rs index dc97d8d..bff079b 100644 --- a/src/part01.rs +++ b/src/part01.rs @@ -89,8 +89,9 @@ pub fn main() { // You will have to replace `part00` by `part01` in the `main` function in // `main.rs` to run this code. -// **Exercise 01.1**: Write a funtion `vec_avg` that computes the average value of a `Vec`. +// **Exercise 01.1**: Write a funtion `vec_avg` that computes the average value of a `Vec` (rounded down to +// the next integer). // -// *Hint*: `vec.len()` returns the length of a vector `vec`. +// *Hint*: `vec.len() as i32` returns the length of a vector `vec` as signed integer. // [index](main.html) | [previous](part00.html) | [next](part02.html)