commit 97f4218

Hubert Hirtz  ·  2021-10-14 21:01:25 +0000 UTC
parent 928c0a0
Simplify channel loop
1 files changed,  +1, -5
M app.go
M app.go
+1, -5
 1@@ -306,11 +306,7 @@ func (app *App) debugOutputMessages(out chan<- irc.Message) chan<- irc.Message {
 2 // uiLoop retrieves events from the UI and forwards them to app.events for
 3 // handling in app.eventLoop().
 4 func (app *App) uiLoop() {
 5-	for {
 6-		ev, ok := <-app.win.Events
 7-		if !ok {
 8-			break
 9-		}
10+	for ev := range app.win.Events {
11 		app.events <- event{
12 			src:     uiEvent,
13 			content: ev,