mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
review tweaks
This commit is contained in:
parent
32e22b3bb6
commit
8dd18bd620
6
db.go
6
db.go
@ -577,7 +577,11 @@ type Stats struct {
|
|||||||
func (s *Stats) Sub(other *Stats) Stats {
|
func (s *Stats) Sub(other *Stats) Stats {
|
||||||
var diff Stats
|
var diff Stats
|
||||||
if s == nil {
|
if s == nil {
|
||||||
return diff
|
if other == nil {
|
||||||
|
return diff
|
||||||
|
} else {
|
||||||
|
return *other
|
||||||
|
}
|
||||||
}
|
}
|
||||||
diff = *s
|
diff = *s
|
||||||
if other == nil {
|
if other == nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user