Skip to content

Commit e7b6d35

Browse files
committed
Fix comment
1 parent a121b15 commit e7b6d35

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

internal/transport/http_util.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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

mem/buffer_pool.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)