example: improve json example
parent
8bc0c31f29
commit
8488f7d82b
|
@ -20,7 +20,10 @@ fn main() {
|
||||||
for i, user in users {
|
for i, user in users {
|
||||||
println('$i) $user.name')
|
println('$i) $user.name')
|
||||||
if !user.can_register() {
|
if !user.can_register() {
|
||||||
println('Cannot register $user.name, they are too young')
|
println('Cannot register $user.name, he is too young')
|
||||||
|
} else {
|
||||||
|
users[i].register()
|
||||||
|
println('$user.name is registered')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Let's encode users again just for fun
|
// Let's encode users again just for fun
|
||||||
|
|
Loading…
Reference in New Issue