updated dependencies
This commit is contained in:
parent
088bd1f03e
commit
e95910d920
148 changed files with 18553 additions and 2442 deletions
6
vendor/golang.org/x/exp/maps/maps.go
generated
vendored
6
vendor/golang.org/x/exp/maps/maps.go
generated
vendored
|
|
@ -63,6 +63,10 @@ func Clear[M ~map[K]V, K comparable, V any](m M) {
|
|||
// Clone returns a copy of m. This is a shallow clone:
|
||||
// the new keys and values are set using ordinary assignment.
|
||||
func Clone[M ~map[K]V, K comparable, V any](m M) M {
|
||||
// Preserve nil in case it matters.
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
r := make(M, len(m))
|
||||
for k, v := range m {
|
||||
r[k] = v
|
||||
|
|
@ -74,7 +78,7 @@ func Clone[M ~map[K]V, K comparable, V any](m M) M {
|
|||
// When a key in src is already present in dst,
|
||||
// the value in dst will be overwritten by the value associated
|
||||
// with the key in src.
|
||||
func Copy[M ~map[K]V, K comparable, V any](dst, src M) {
|
||||
func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2) {
|
||||
for k, v := range src {
|
||||
dst[k] = v
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue