drop the *s guard

master
Martin Kobetic 2014-06-24 17:39:48 +00:00
parent 78d08e0438
commit ba79a0a355
1 changed files with 1 additions and 9 deletions

10
db.go
View File

@ -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
}