mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: apply todo suggestion in word counter (#6640)
This commit is contained in:
parent
2d446aa2ce
commit
4bc38a2f6c
@ -19,7 +19,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
mut m := map[string]int
|
mut m := map[string]int
|
||||||
for word in extract_words(contents) {
|
for word in extract_words(contents) {
|
||||||
m[word] = m[word] + 1 // TODO m[key]++
|
m[word]++
|
||||||
}
|
}
|
||||||
// Sort the keys
|
// Sort the keys
|
||||||
mut keys := m.keys()
|
mut keys := m.keys()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user