We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to write the following code with map:
map
fn foobar(map: Option<&BTreeMap<u32,u32>>) { let temp; let map = match map { Some(a) => a, None => { temp = BTreeMap::new(); &temp } } // Do something. }
But the following thing doesn't work:
let temp; map.unwrap_or_else(|| { temp = BTreeMap::new(); &temp })
The text was updated successfully, but these errors were encountered:
Looks similar to #8338.
Sorry, something went wrong.
Triage: no change. reproducible: https://is.gd/ktvqme
Closing as per #8338 (comment).
No branches or pull requests
I'd like to write the following code with
map
:But the following thing doesn't work:
The text was updated successfully, but these errors were encountered: