MCPcopy
hub / github.com/syncthing/syncthing / equalStringsInAnyOrder

Function equalStringsInAnyOrder

lib/model/model_test.go:4122–4134  ·  view source on GitHub ↗
(a, b []string)

Source from the content-addressed store, hash-verified

4120}
4121
4122func equalStringsInAnyOrder(a, b []string) bool {
4123 if len(a) != len(b) {
4124 return false
4125 }
4126 slices.Sort(a)
4127 slices.Sort(b)
4128 for i := range a {
4129 if a[i] != b[i] {
4130 return false
4131 }
4132 }
4133 return true
4134}
4135
4136// modtimeTruncatingFS is a FileSystem that returns modification times only
4137// to the closest two `trunc` interval.

Callers 1

TestBlockListMapFunction · 0.85

Calls 1

SortMethod · 0.80

Tested by

no test coverage detected