mirror of https://github.com/hak5/bolt.git
drop the *s guard
parent
78d08e0438
commit
ba79a0a355
10
db.go
10
db.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue