mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
vlib,cgen: cleanup array inits using `.repeat() instead of new init syntax
This commit is contained in:
parent
2669610be9
commit
c84bafbdae
31 changed files with 52 additions and 53 deletions
|
@ -379,7 +379,7 @@ fn (n &mapnode) subkeys(mut keys []string, at int) int {
|
|||
}
|
||||
|
||||
pub fn (m &SortedMap) keys() []string {
|
||||
mut keys := [''].repeat(m.len)
|
||||
mut keys := []string{len:m.len}
|
||||
if isnil(m.root) || m.root.len == 0 {
|
||||
return keys
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue