1
0
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:
Quentin Champ 2020-10-18 22:46:13 +02:00 committed by GitHub
parent 2d446aa2ce
commit 4bc38a2f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ fn main() {
}
mut m := map[string]int
for word in extract_words(contents) {
m[word] = m[word] + 1 // TODO m[key]++
m[word]++
}
// Sort the keys
mut keys := m.keys()