map: make .keys() pure

pull/2096/head
Alexander Medvednikov 2019-09-25 05:56:10 +03:00 committed by GitHub
parent 55d09d23b4
commit ab52b453cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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