Skip to content

I'm in hashmaps3.rs double borrow purgatory :) #2168

Closed Answered by feoh
feoh asked this question in Q&A
Discussion options

You must be logged in to vote

OK now I'm feeling sheepish about having posted.

I figured out the solution. You just have to re-use a single &mut Team for both .entry().or_insert()

Solution: https://gist.github.com/feoh/608dc1495143021c38ad2a46beaf42d1

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by feoh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant