]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Update ReadCloser interface check to ReadSeekCloser (#595)
authorYenForYang <YenForYang@users.noreply.github.com>
Sun, 12 Sep 2021 04:14:07 +0000 (23:14 -0500)
committerGitHub <noreply@github.com>
Sun, 12 Sep 2021 04:14:07 +0000 (14:14 +1000)
reader.go

index d21231bc6b3325a7a239201127bf31f00ff1b49c..a5a865710f7256703fb3099652aca500e0b78d67 100644 (file)
--- a/reader.go
+++ b/reader.go
@@ -14,9 +14,7 @@ import (
 // Accesses Torrent data via a Client. Reads block until the data is available. Seeks and readahead
 // also drive Client behaviour.
 type Reader interface {
-       io.Reader
-       io.Seeker
-       io.Closer
+       io.ReadSeekCloser
        missinggo.ReadContexter
        // Configure the number of bytes ahead of a read that should also be prioritized in preparation
        // for further reads.
@@ -54,7 +52,7 @@ type reader struct {
        pieces pieceRange
 }
 
-var _ io.ReadCloser = (*reader)(nil)
+var _ io.ReadSeekCloser = (*reader)(nil)
 
 func (r *reader) SetResponsive() {
        r.responsive = true