From ecfd860d15b176cdf66a03dcc328f17e456229e8 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Mon, 17 Apr 2017 20:42:06 +0200 Subject: [PATCH] Simplify incrementation --- runtime/stats.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/stats.go b/runtime/stats.go index ec5bb64..53d0819 100644 --- a/runtime/stats.go +++ b/runtime/stats.go @@ -50,7 +50,6 @@ func NewGlobalStats(nodes *Nodes) (result *GlobalStats) { // if the value is not empty func (m CounterMap) Increment(key string) { if key != "" { - val := m[key] - m[key] = val + 1 + m[key]++ } }