mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-14 07:18:32 +02:00
Unit testing the automerge library and lib functions
This commit is contained in:
@ -30,7 +30,7 @@ func MapKeys[K comparable, V any](m map[K]V) []K {
|
||||
values := make([]K, len(m))
|
||||
|
||||
i := 0
|
||||
for k, _ := range m {
|
||||
for k := range m {
|
||||
values[i] = k
|
||||
i++
|
||||
}
|
||||
@ -58,7 +58,7 @@ type filterFunc[V any] func(V) bool
|
||||
func Filter[V any](list []V, f filterFunc[V]) []V {
|
||||
newList := make([]V, 0)
|
||||
|
||||
for _, elem := range newList {
|
||||
for _, elem := range list {
|
||||
if f(elem) {
|
||||
newList = append(newList, elem)
|
||||
}
|
||||
|
Reference in New Issue
Block a user