diff options
author | Martin Kobetic <mkobetic@gmail.com> | 2014-06-24 17:39:48 +0000 |
---|---|---|
committer | Martin Kobetic <mkobetic@gmail.com> | 2014-06-24 17:40:53 +0000 |
commit | ba79a0a355f2511adbc2c7356a3362da180548c8 (patch) | |
tree | e02d68cfc5844db5a274ad76c26714a78612237e | |
parent | Merge pull request #212 from Shopify/stats_sub (diff) | |
download | dedo-ba79a0a355f2511adbc2c7356a3362da180548c8.tar.gz dedo-ba79a0a355f2511adbc2c7356a3362da180548c8.tar.xz |
drop the *s guard
-rw-r--r-- | db.go | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -575,15 +575,7 @@ type Stats struct { // This is useful when obtaining stats at two different points and time and // you need the performance counters that occurred within that time span. func (s *Stats) Sub(other *Stats) Stats { - var diff Stats - if s == nil { - if other == nil { - return diff - } else { - return *other - } - } - diff = *s + var diff = *s if other == nil { return diff } |