Commit b5263d6a authored by Steven Allen's avatar Steven Allen

use `copy` instead of looping

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent afe71e4b
......@@ -75,9 +75,7 @@ func (dr *PBDagReader) preloadNextNodes(ctx context.Context) {
end = len(dr.links)
}
for i, p := range ipld.GetNodes(ctx, dr.serv, dr.links[beg:end]) {
dr.promises[beg+i] = p
}
copy(dr.promises[beg:], ipld.GetNodes(ctx, dr.serv, dr.links[beg:end]))
}
// precalcNextBuf follows the next link in line and loads it from the
......
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