map: make .keys() pure
parent
55d09d23b4
commit
ab52b453cb
|
@ -167,7 +167,7 @@ fn preorder_keys(node &mapnode, keys mut []string, key_i int) int {
|
|||
return i
|
||||
}
|
||||
|
||||
pub fn (m mut map) keys() []string {
|
||||
pub fn (m &map) keys() []string {
|
||||
mut keys := [''].repeat(m.size)
|
||||
if isnil(m.root) {
|
||||
return keys
|
||||
|
|
Loading…
Reference in New Issue