From d972a5e8f2b51ae39cfc5974d7f8cc89251d9a1f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 24 Dec 2022 12:50:31 +1300 Subject: [PATCH] remove unused version parameter from stream constructor --- stream.go | 5 +---- stream_test.go | 2 +- streams_map.go | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/stream.go b/stream.go index 2a4d55b8..659a4fde 100644 --- a/stream.go +++ b/stream.go @@ -80,8 +80,6 @@ type stream struct { sender streamSender receiveStreamCompleted bool sendStreamCompleted bool - - version protocol.VersionNumber } var _ Stream = &stream{} @@ -90,9 +88,8 @@ var _ Stream = &stream{} func newStream(streamID protocol.StreamID, sender streamSender, flowController flowcontrol.StreamFlowController, - version protocol.VersionNumber, ) *stream { - s := &stream{sender: sender, version: version} + s := &stream{sender: sender} senderForSendStream := &uniStreamSender{ streamSender: sender, onStreamCompletedImpl: func() { diff --git a/stream_test.go b/stream_test.go index e98a8a3b..185501e3 100644 --- a/stream_test.go +++ b/stream_test.go @@ -40,7 +40,7 @@ var _ = Describe("Stream", func() { BeforeEach(func() { mockSender = NewMockStreamSender(mockCtrl) mockFC = mocks.NewMockStreamFlowController(mockCtrl) - str = newStream(streamID, mockSender, mockFC, protocol.VersionWhatever) + str = newStream(streamID, mockSender, mockFC) timeout := scaleDuration(250 * time.Millisecond) strWithTimeout = struct { diff --git a/streams_map.go b/streams_map.go index 35e1aba1..03cea9f4 100644 --- a/streams_map.go +++ b/streams_map.go @@ -89,7 +89,7 @@ func (m *streamsMap) initMaps() { protocol.StreamTypeBidi, func(num protocol.StreamNum) streamI { id := num.StreamID(protocol.StreamTypeBidi, m.perspective) - return newStream(id, m.sender, m.newFlowController(id), m.version) + return newStream(id, m.sender, m.newFlowController(id)) }, m.sender.queueControlFrame, ) @@ -97,7 +97,7 @@ func (m *streamsMap) initMaps() { protocol.StreamTypeBidi, func(num protocol.StreamNum) streamI { id := num.StreamID(protocol.StreamTypeBidi, m.perspective.Opposite()) - return newStream(id, m.sender, m.newFlowController(id), m.version) + return newStream(id, m.sender, m.newFlowController(id)) }, m.maxIncomingBidiStreams, m.sender.queueControlFrame,