camput: remove Go 1.0 workaround.

Now that we rely on Go 1.1, we no longer need to workaround https://code.google.com/p/go/issues/detail?id=4589

Change-Id: Ib6631679e7f9bcea82ef96df0f50d9ecace31aa3
This commit is contained in:
Brad Fitzpatrick 2013-06-16 20:56:58 -07:00
parent c6577d600c
commit d1fd483548
1 changed files with 1 additions and 5 deletions

View File

@ -453,11 +453,7 @@ func (up *Uploader) wholeFileDigest(fullPath string) (*blobref.BlobRef, error) {
}
defer file.Close()
td := &trackDigestReader{r: file}
// Warning: the struct in the following line exists to hide
// ioutil.Discard's ReadFrom from io.Copy, since ReadFrom uses
// an intentionally-racy buffer that's passed to the reader,
// which was causing SHA-1 calculation corruption.
_, err = io.Copy(struct{ io.Writer }{ioutil.Discard}, td)
_, err = io.Copy(ioutil.Discard, td)
atomic.AddInt64(&atomicDigestOps, 1)
if err != nil {
return nil, err