Skip to content

Commit

Permalink
Merge pull request #52 from libp2p/remove-stream-shrink
Browse files Browse the repository at this point in the history
remove unused Stream.Shrink() method
  • Loading branch information
marten-seemann authored Feb 21, 2021
2 parents 6cac08a + a8f2d8b commit 9b04322
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,6 @@ func TestManyStreams_PingPong(t *testing.T) {
return
}

// Shrink the internal buffer!
stream.Shrink()

// Write out the 'pong'
n, err = stream.Write(pong)
if err != nil {
Expand Down Expand Up @@ -791,9 +788,6 @@ func TestManyStreams_PingPong(t *testing.T) {
t.Errorf("bad: %s", buf)
return
}

// Shrink the buffer
stream.Shrink()
}
}

Expand Down
4 changes: 0 additions & 4 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,3 @@ func (s *Stream) SetWriteDeadline(t time.Time) error {
}
return nil
}

// Shrink is a no-op. The internal buffer automatically shrinks itself.
func (s *Stream) Shrink() {
}

0 comments on commit 9b04322

Please sign in to comment.