Skip to content

Commit bada191

Browse files
committed
Correct docs
1 parent 5fdb0cb commit bada191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ Within the body of an item that has type parameter declarations, the names of it
28262826
~~~~~~~
28272827
fn map<A: Copy, B: Copy>(f: &fn(A) -> B, xs: &[A]) -> ~[B] {
28282828
if xs.len() == 0 { return ~[]; }
2829-
let first: B = f(xs[0]);
2829+
let first: B = f(copy xs[0]);
28302830
let rest: ~[B] = map(f, xs.slice(1, xs.len()));
28312831
return ~[first] + rest;
28322832
}

0 commit comments

Comments
 (0)