diff --git a/cid.go b/cid.go index d078b9a2d920dc99f852a411752992e77e452e5f..becf6e89f81945fb144610c1a0f763af74ba2ada 100644 --- a/cid.go +++ b/cid.go @@ -415,9 +415,8 @@ func (c Cid) ByteLen() int { } // WriteTo writes the cids bytes to the given writer -func (c Cid) WriteTo(w io.Writer) error { - _, err := io.WriteString(w, c.str) - return err +func (c Cid) WriteTo(w io.Writer) (int, error) { + return io.WriteString(w, c.str) } // MarshalBinary is equivalent to Bytes(). It implements the