projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d49bdd8
)
extend ex01.1 hint
author
Ralf Jung
<post@ralfj.de>
Fri, 19 Jun 2015 20:51:00 +0000
(22:51 +0200)
committer
Ralf Jung
<post@ralfj.de>
Fri, 19 Jun 2015 20:51:00 +0000
(22:51 +0200)
src/part01.rs
patch
|
blob
|
history
diff --git
a/src/part01.rs
b/src/part01.rs
index dc97d8dbc1d957e29c5009207809523c0ea3d793..bff079b7db7af065dc04fd95ff371333157dcfe0 100644
(file)
--- 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.
// 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<i32>`.
+// **Exercise 01.1**: Write a funtion `vec_avg` that computes the average value of a `Vec<i32>` (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)
// [index](main.html) | [previous](part00.html) | [next](part02.html)