mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
map: make .keys() pure
This commit is contained in:
parent
55d09d23b4
commit
ab52b453cb
@ -167,7 +167,7 @@ fn preorder_keys(node &mapnode, keys mut []string, key_i int) int {
|
|||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (m mut map) keys() []string {
|
pub fn (m &map) keys() []string {
|
||||||
mut keys := [''].repeat(m.size)
|
mut keys := [''].repeat(m.size)
|
||||||
if isnil(m.root) {
|
if isnil(m.root) {
|
||||||
return keys
|
return keys
|
||||||
|
Loading…
Reference in New Issue
Block a user