Преглед на файлове

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)