aboutsummaryrefslogtreecommitdiffstats
path: root/mux.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-08-16 15:49:14 -0400
committerSam Anthony <sam@samanthony.xyz>2024-08-16 15:49:14 -0400
commitee1ecb5c17ebe98d18dc62390ecb6c09f648a52e (patch)
treeb8f1e9940cdda694625ff31ceab127fef513f182 /mux.go
parent101f952422b55a06206c63c9c0d9af3147112e92 (diff)
downloadgui-ee1ecb5c17ebe98d18dc62390ecb6c09f648a52e.zip
gofmt
Diffstat (limited to 'mux.go')
-rw-r--r--mux.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/mux.go b/mux.go
index 6e5dcdb..f4eb6d1 100644
--- a/mux.go
+++ b/mux.go
@@ -10,8 +10,8 @@ import (
// events and their draw functions get redirected to the root Env.
type Mux struct {
addEventsIn chan<- chan<- Event
- size sharedVal[image.Rectangle]
- draw chan<- func(draw.Image) image.Rectangle
+ size sharedVal[image.Rectangle]
+ draw chan<- func(draw.Image) image.Rectangle
}
// NewMux creates a new Mux that multiplexes the given Env. It returns the Mux along with
@@ -24,7 +24,7 @@ func NewMux(env Env) (mux *Mux, master Env) {
drawChan := make(chan func(draw.Image) image.Rectangle)
mux = &Mux{
addEventsIn: addEventsIn,
- size: size,
+ size: size,
draw: drawChan,
}
@@ -123,4 +123,7 @@ func (mux *Mux) makeEnv(master bool) Env {
return env
}
-func drain[T any](c <-chan T) { for range c {} }
+func drain[T any](c <-chan T) {
+ for range c {
+ }
+}