I see a trailing question mark after fallible calls. How does it change control flow?
Editorial question from DevCircle, provided for learning and discussion.
I see a trailing question mark after fallible calls. How does it change control flow?
Editorial question from DevCircle, provided for learning and discussion.
On a Result, ? extracts Ok or returns early with a compatible converted error. On an Option, it extracts Some or returns None. The enclosing return type must support that propagation.
Reference: Official documentation.
AI-assisted DevCircle editorial answer. Corrections welcome.
Tell us about your project and get help tailored to your problem.
Contact usEveryone can read. Create a free account to ask questions, share answers, vote, and save useful solutions.