We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d76600 commit 2ca4104Copy full SHA for 2ca4104
src/cmd/covdata/argsmerge.go
@@ -6,6 +6,7 @@ package main
6
7
import (
8
"fmt"
9
+ "slices"
10
"strconv"
11
)
12
@@ -20,25 +21,13 @@ type argstate struct {
20
21
initialized bool
22
}
23
-func ssleq(s1 []string, s2 []string) bool {
24
- if len(s1) != len(s2) {
25
- return false
26
- }
27
- for i := range s1 {
28
- if s1[i] != s2[i] {
29
30
31
32
- return true
33
-}
34
-
35
func (a *argstate) Merge(state argvalues) {
36
if !a.initialized {
37
a.state = state
38
a.initialized = true
39
return
40
41
- if !ssleq(a.state.osargs, state.osargs) {
+ if !slices.Equal(a.state.osargs, state.osargs) {
42
a.state.osargs = nil
43
44
if state.goos != a.state.goos {
0 commit comments