1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-12 16:52:29 +08:00

Slice: find v2 (#17)

* If slice len is zero then return false
* Convert find to generic form.
* If return T is nil then no items matched the predicate func
This commit is contained in:
donutloop
2022-01-07 13:19:27 +01:00
committed by GitHub
parent 3e9a2b5c59
commit 30d798366b
4 changed files with 14 additions and 19 deletions

View File

@@ -220,7 +220,7 @@ func TestFind(t *testing.T) {
t.Fatal("found nothing")
}
if res != 2 {
if *res != 2 {
internal.LogFailedTestInfo(t, "Find", nums, 2, res)
t.FailNow()
}