[MM-29240] Improve buffer handling of UploadEmojiImage (#25536)

Этот коммит содержится в:
Ben Schumacher
2023-12-19 10:00:01 +01:00
коммит произвёл GitHub
родитель 8a0cef910a
Коммит 799ec680bd
6 изменённых файлов: 196 добавлений и 79 удалений

Просмотреть файл

@@ -15,7 +15,7 @@ import (
"github.com/stretchr/testify/require"
)
func CreateTestGif(t *testing.T, width int, height int) []byte {
func CreateTestGif(t testing.TB, width int, height int) []byte {
var buffer bytes.Buffer
err := gif.Encode(&buffer, image.NewRGBA(image.Rect(0, 0, width, height)), nil)
@@ -50,7 +50,7 @@ func CreateTestJpeg(t *testing.T, width int, height int) []byte {
return buffer.Bytes()
}
func CreateTestPng(t *testing.T, width int, height int) []byte {
func CreateTestPng(t testing.TB, width int, height int) []byte {
var buffer bytes.Buffer
err := png.Encode(&buffer, image.NewRGBA(image.Rect(0, 0, width, height)))