File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -486,10 +486,9 @@ func (f *framer) readDataFrame(fh http2.FrameHeader) (err error) {
486486 f .errDetail = errors .New ("DATA frame with stream ID 0" )
487487 return http2 .ConnectionError (http2 .ErrCodeProtocol )
488488 }
489- // Converting a *[]byte to a mem.BufferSlice incurs a heap allocation. This
489+ // Converting a *[]byte to a mem.SliceBuffer incurs a heap allocation. This
490490 // conversion is performed by mem.NewBuffer. To avoid the extra allocation
491- // a []byte is allocated directly if required and casted to a
492- // mem.BufferSlice.
491+ // a []byte is allocated directly if required and cast to a mem.SliceBuffer.
493492 var buf []byte
494493 // poolHandle is the pointer returned by the buffer pool (if it's used.).
495494 var poolHandle * []byte
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ type BufferPool interface {
3333
3434 // Put returns a buffer to the pool.
3535 //
36- // The provided pointer must hold a prefix of the buffer obtained via [Get]
37- // to ensure the buffer's entire capacity can be re-used.
36+ // The provided pointer must hold a prefix of the buffer obtained via
37+ // BufferPool.Get to ensure the buffer's entire capacity can be re-used.
3838 Put (* []byte )
3939}
4040
You can’t perform that action at this time.
0 commit comments