diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-06-16 12:48:08 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-06-16 12:48:08 -0400 |
| commit | bada191309d43d481d265bb1ff9c3a14e827babf (patch) | |
| tree | ace0efae202d0ff19a99dbe188c6fbb875785b83 | |
| parent | 5fdb0cbb8ce98bdddc947fc1eeabd2efd509aadc (diff) | |
| download | rust-bada191309d43d481d265bb1ff9c3a14e827babf.tar.gz rust-bada191309d43d481d265bb1ff9c3a14e827babf.zip | |
Correct docs
| -rw-r--r-- | doc/rust.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/rust.md b/doc/rust.md index 3c0828def15..9edbc44d6c2 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -2826,7 +2826,7 @@ Within the body of an item that has type parameter declarations, the names of it ~~~~~~~ fn map<A: Copy, B: Copy>(f: &fn(A) -> B, xs: &[A]) -> ~[B] { if xs.len() == 0 { return ~[]; } - let first: B = f(xs[0]); + let first: B = f(copy xs[0]); let rest: ~[B] = map(f, xs.slice(1, xs.len())); return ~[first] + rest; } |
