Skip to content

Commit 78071be

Browse files
committed
Apply go modernize
1 parent 0f3d0ed commit 78071be

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sender_report_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package rtcp
55

66
import (
7+
"slices"
78
"testing"
89

910
"github.com/stretchr/testify/assert"
@@ -185,12 +186,8 @@ func TestSenderReportUnmarshal(t *testing.T) {
185186

186187
var ssrcFound bool
187188
dstSsrc := sr.DestinationSSRC()
188-
for _, v := range dstSsrc {
189-
if v == sr.SSRC {
190-
ssrcFound = true
191-
192-
break
193-
}
189+
if slices.Contains(dstSsrc, sr.SSRC) {
190+
ssrcFound = true
194191
}
195192

196193
assert.Truef(t, ssrcFound, "Unmarshal %q sr: sr's DestinationSSRC should include it's SSRC field", test.Name)

0 commit comments

Comments
 (0)