forked from quic-go/quic-go
remove the error return value from wire.Frame.MinLength
No functional change expected. The error was only non-nil if some required values for the STOP_WAITING frame were not set. It should be sufficient to throw an error when attempting to write an invalid STOP_WAITING frame.
This commit is contained in:
@@ -117,7 +117,7 @@ func (f *StreamFrame) Write(b *bytes.Buffer, version protocol.VersionNumber) err
|
||||
|
||||
// MinLength returns the length of the header of a StreamFrame
|
||||
// the total length of the frame is frame.MinLength() + frame.DataLen()
|
||||
func (f *StreamFrame) MinLength(version protocol.VersionNumber) (protocol.ByteCount, error) {
|
||||
func (f *StreamFrame) MinLength(version protocol.VersionNumber) protocol.ByteCount {
|
||||
if !version.UsesIETFFrameFormat() {
|
||||
return f.minLengthLegacy(version)
|
||||
}
|
||||
@@ -128,5 +128,5 @@ func (f *StreamFrame) MinLength(version protocol.VersionNumber) (protocol.ByteCo
|
||||
if f.DataLenPresent {
|
||||
length += utils.VarIntLen(uint64(f.DataLen()))
|
||||
}
|
||||
return length, nil
|
||||
return length
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user