Skip to content

Commit

Permalink
Revert slices.Clone
Browse files Browse the repository at this point in the history
This isn't available in go <1.21 so reverting to copy for now.
  • Loading branch information
ankur22 committed Sep 12, 2024
1 parent 50f646e commit 2c70820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"net/http"
"net/http/httptest"
"slices"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -399,7 +398,8 @@ func (m *mockTracer) cloneOrderedSpans() []string {
m.mu.Lock()
defer m.mu.Unlock()

c := slices.Clone(m.orderedSpans)
c := make([]string, len(m.orderedSpans))
copy(c, m.orderedSpans)

m.orderedSpans = []string{}

Expand Down

0 comments on commit 2c70820

Please sign in to comment.