From c79040a961da97592d13ad6b5dd754b9275cd10f Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 10 Oct 2019 13:10:58 -0400 Subject: [PATCH] Fix performance bug. --- examples/sensors/main.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/sensors/main.go b/examples/sensors/main.go index ba5a330..0148850 100644 --- a/examples/sensors/main.go +++ b/examples/sensors/main.go @@ -80,11 +80,9 @@ func eventloop() { resetSysinset(e.Insets) sysinset.Layout(gtx, func() { margin.Layout(gtx, func() { - for i := 0; i < len(labels); i++ { - list.Layout(gtx, len(labels), func(i int) { - labels[i].Layout(gtx) - }) - } + list.Layout(gtx, len(labels), func(i int) { + labels[i].Layout(gtx) + }) }) }) w.Update(gtx.Ops)