forked from quic-go/quic-go
wire: remove FrameParser interface, expose FrameParser struct (#4284)
Instead, expose the FrameParser struct. This allows us to embed it directly into the connection struct, avoiding a pointer indirection.
This commit is contained in:
@@ -14,7 +14,7 @@ var _ = Describe("Frame parsing", func() {
|
||||
var parser FrameParser
|
||||
|
||||
BeforeEach(func() {
|
||||
parser = NewFrameParser(true)
|
||||
parser = *NewFrameParser(true)
|
||||
})
|
||||
|
||||
It("returns nil if there's nothing more to read", func() {
|
||||
@@ -315,7 +315,7 @@ var _ = Describe("Frame parsing", func() {
|
||||
})
|
||||
|
||||
It("errors when DATAGRAM frames are not supported", func() {
|
||||
parser = NewFrameParser(false)
|
||||
parser = *NewFrameParser(false)
|
||||
f := &DatagramFrame{Data: []byte("foobar")}
|
||||
b, err := f.Append(nil, protocol.Version1)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
Reference in New Issue
Block a user