diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-24 18:13:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-24 18:13:39 +0300 |
| commit | 5fddbbf194085205977c8ca652c97ffb6ec7f522 (patch) | |
| tree | 3ff6f01c9ac554fd66c839e96fe1f86e8ea9e644 /internal | |
| parent | d26538869e4bdb6379b59f72847b22125556f997 (diff) | |
fix(rpn): widen RPN.consts to ConstantsProvider, remove unsafe type assertion (task yj)
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/rpn/rpn_state.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/rpn/rpn_state.go b/internal/rpn/rpn_state.go index abb9ab8..fc64535 100644 --- a/internal/rpn/rpn_state.go +++ b/internal/rpn/rpn_state.go @@ -13,7 +13,7 @@ import ( type RPN struct { mu sync.RWMutex vars VariableStore - consts ConstantsReader + consts ConstantsProvider ops OperationsProvider opRegistry *OperatorRegistry assignHandler *assignmentHandler @@ -42,7 +42,7 @@ func NewRPN(vars VariableStore, reg ...*MetricRegistry) *RPN { // GetConstants returns the constants provider. // This method is thread-safe for concurrent reads. func (r *RPN) GetConstants() ConstantsProvider { - return r.consts.(ConstantsProvider) + return r.consts } // GetMode returns the current calculation mode. |
