Skip to content

Commit a2e8358

Browse files
committed
chore: minor
1 parent 0798687 commit a2e8358

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

core/metrics/accumulator.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"time"
77

88
"github.com/benbjohnson/clock"
9-
"github.com/samber/lo"
109
)
1110

1211
type Accumulator struct {
@@ -65,7 +64,7 @@ func (m *Accumulator) Exported() float64 {
6564
func (m *Accumulator) SetImportMeterTotal(v float64) {
6665
defer func() {
6766
m.updated = m.clock.Now()
68-
m.importMeter = lo.ToPtr(v)
67+
m.importMeter = new(v)
6968
}()
7069

7170
if m.importMeter == nil {
@@ -81,7 +80,7 @@ func (m *Accumulator) SetImportMeterTotal(v float64) {
8180
func (m *Accumulator) SetExportMeterTotal(v float64) {
8281
defer func() {
8382
m.updated = m.clock.Now()
84-
m.exportMeter = lo.ToPtr(v)
83+
m.exportMeter = new(v)
8584
}()
8685

8786
if m.exportMeter == nil {

0 commit comments

Comments
 (0)