瀏覽代碼

Add comment that dst and src must not overlap.

Nigel Tao 9 年之前
父節點
當前提交
0c43e98dfe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      encode.go

+ 1 - 1
encode.go

@@ -25,7 +25,7 @@ func load64(b []byte, i int) uint64 {
 // slice of dst if dst was large enough to hold the entire encoded block.
 // Otherwise, a newly allocated slice will be returned.
 //
-// It is valid to pass a nil dst.
+// The dst and src must not overlap. It is valid to pass a nil dst.
 func Encode(dst, src []byte) []byte {
 	if n := MaxEncodedLen(len(src)); n < 0 {
 		panic(ErrTooLarge)