Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Rust
/
Collections
Which expression calls build_profile only when user_id is absent?
from Collections
Rust 1.98
intermediate
1 min
Which expression calls build_profile only when user_id is absent?
profiles.entry(user_id).or_insert_with(build_profile)
profiles.entry(user_id).or_insert(build_profile())
profiles.get(&user_id).unwrap_or(&build_profile())
profiles.contains_key(&user_id).then(build_profile)
Check
Ask AI about this kata
Report an error
previous kata
Which standard collection most directly expresses a key-value map that must iterate by ke…
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload