From 5c3c0a05f86cf754e117e5682a7bce76cd9d5943 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 4 Feb 2021 13:42:17 +0200 Subject: [PATCH] more idiomatic code --- swarm.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swarm.go b/swarm.go index d297f35..b75e24b 100644 --- a/swarm.go +++ b/swarm.go @@ -202,8 +202,7 @@ func (s *Swarm) addConn(tc transport.CapableConn, dir network.Direction) (*Conn, // create the Stat object, initializing with the underlying connection Stat if available var stat network.Stat - cs, ok := tc.(network.ConnStat) - if ok { + if cs, ok := tc.(network.ConnStat); ok { stat = cs.Stat() } stat.Direction = dir -- GitLab