mirror of
https://github.com/restic/restic.git
synced 2024-12-25 17:27:25 +00:00
Use newRandReader instead of rand.New()
This needs to be done since for Go < 1.6 rand.Rand does not implement io.Reader.
This commit is contained in:
parent
18c3024171
commit
e4a6dd8c8c
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ func fillPacks(t testing.TB, rnd *randReader, be Saver, pm *packerManager, buf [
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
rd := rand.New(rand.NewSource(seed))
|
rd := newRandReader(rand.NewSource(seed))
|
||||||
id := randomID(rd)
|
id := randomID(rd)
|
||||||
buf = buf[:l]
|
buf = buf[:l]
|
||||||
_, err = io.ReadFull(rd, buf)
|
_, err = io.ReadFull(rd, buf)
|
||||||
|
|
Loading…
Reference in a new issue