1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

map: make DenseArray.has_index not assume string keys (#7284)

This commit is contained in:
Nick Treleaven
2020-12-13 01:05:56 +00:00
committed by GitHub
parent 4324be9bd8
commit ae460a2208
2 changed files with 31 additions and 11 deletions

View File

@ -5,7 +5,7 @@ const (
)
fn unique_strings(arr_len int, str_len int) []string {
mut arr := []string{}
mut arr := []string{cap: arr_len}
for arr.len < arr_len {
str := rand.string(str_len)
if str !in arr {