Commit 9e0d2fa8 authored by Robert Griesemer's avatar Robert Griesemer

better code for a copy loop

R=rsc
https://golang.org/cl/152046
parent 44fb865a
......@@ -19,8 +19,8 @@ type Vector struct {
func copy(dst, src []Element) {
for i := 0; i < len(src); i++ {
dst[i] = src[i]
for i, x := range src {
dst[i] = x
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment