remove check for ReaderFrom on underlying writer, as it may be badly implemented.

pull/720/merge
Darien Raymond 2017-11-20 11:13:27 +01:00
parent ee8d2ebfa9
commit ec8f8d4e10
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 1 additions and 5 deletions

View File

@ -137,12 +137,8 @@ func (w *BufferedWriter) ReadFrom(reader io.Reader) (int64, error) {
}
w.buffered = false
if readerFrom, ok := w.writer.(io.ReaderFrom); ok {
return readerFrom.ReadFrom(reader)
}
err := Copy(NewReader(reader), w, CountSize(&sc))
return sc.Size, err
}