git/odb: simplify Blob.Encode

This commit is contained in:
Taylor Blau 2017-05-16 16:04:39 -06:00
parent a2c5a91774
commit 8d232a4f06

@ -48,9 +48,7 @@ func (b *Blob) Decode(r io.Reader, size int64) (n int, err error) {
// Otherwise, the number of bytes written will be returned.
func (b *Blob) Encode(to io.Writer) (n int, err error) {
nn, err := io.Copy(to, b.Contents)
if err != nil {
return 0, err
}
return int(nn), err
}