diff --git a/stream/encoding.go b/stream/encoding.go index 0cc31eb4..664ec383 100644 --- a/stream/encoding.go +++ b/stream/encoding.go @@ -34,7 +34,7 @@ type Encoder interface { GetDst() io.Writer } -// NopEncoder returns an +// NopEncoder returns an Encoder that performs no operation. func NopEncoder(dst io.Writer) Encoder { return noop{dst} } @@ -45,8 +45,7 @@ type noop struct { // Write implements io.Writer. func (e noop) Write(p []byte) (int, error) { - n, err := e.dst.Write(p) - return n, err + return e.dst.Write(p) } func (e noop) GetDst() io.Writer { return e.dst }