Fix code relating to cookies

This commit is contained in:
2024-09-12 02:42:55 -04:00
parent e08d14135b
commit 2312b48a28
5 changed files with 12 additions and 25 deletions

View File

@@ -1,7 +1,6 @@
package tss
import "os"
import "io"
import "fmt"
import "image"
import "errors"
@@ -81,7 +80,7 @@ func (this *styleBuilder) build () (*style.Style, event.Cookie, error) {
// add each texture to the cookies list
for _, texture := range this.textures {
cookies = append(cookies, closerCookie { Closer: texture })
cookies = append(cookies, texture)
}
return sty, event.MultiCookie(cookies...), nil
@@ -398,10 +397,3 @@ func copyBorderValue[T any, U ~[]T] (destination, source U) bool {
return false
}
}
type closerCookie struct {
io.Closer
}
func (cookie closerCookie) Close () {
cookie.Closer.Close()
}