Simplify.

This commit is contained in:
Dmitry Chestnykh 2014-08-09 17:13:26 +02:00
parent 29a0069dc7
commit 9eb2cf0919

View File

@ -52,7 +52,7 @@ func NewLenChars(length int, chars []byte) string {
if clen > 256 {
panic("uniuri: maximum length of charset for NewLenChars is 256")
}
maxrb := 256 - (256 % len(chars))
maxrb := 256 - (256 % clen)
i := 0
for {
if _, err := io.ReadFull(rand.Reader, r); err != nil {