diff options
Diffstat (limited to 'internal/rpn/operations.go')
| -rw-r--r-- | internal/rpn/operations.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/rpn/operations.go b/internal/rpn/operations.go index 4bd1e4b..5d90212 100644 --- a/internal/rpn/operations.go +++ b/internal/rpn/operations.go @@ -365,9 +365,9 @@ func (o *Operations) Swap(stack *Stack) error { top := vals[len(vals)-1] second := vals[len(vals)-2] - // Pop both - stack.Pop() - stack.Pop() + // Pop both (this won't fail because we checked stack.Len() >= 2 above) + _, _ = stack.Pop() + _, _ = stack.Pop() // Push in swapped order stack.Push(top) |
