This commit is contained in:
parent
7a6ed8be9b
commit
046a393313
2 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ func contains(container any, element any) bool {
|
|||
|
||||
matchingElements := 0
|
||||
|
||||
for i := 0; i < containerValue.Len(); i++ {
|
||||
for i := range containerValue.Len() {
|
||||
if containerValue.Index(i).Interface() == elementValue.Index(matchingElements).Interface() {
|
||||
matchingElements++
|
||||
} else {
|
||||
|
@ -75,7 +75,7 @@ func contains(container any, element any) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
for i := 0; i < containerValue.Len(); i++ {
|
||||
for i := range containerValue.Len() {
|
||||
if containerValue.Index(i).Interface() == element {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -51,4 +51,4 @@ Please see the [license documentation](https://urbach.dev/license).
|
|||
|
||||
## Copyright
|
||||
|
||||
© 2019 Eduard Urbach
|
||||
© 2019 Eduard Urbach
|
Loading…
Add table
Add a link
Reference in a new issue