Skip to content
New issue

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

Fix warning for immutable/mutable borrowing #13

Merged
merged 1 commit into from
Oct 30, 2021

Conversation

conbrad
Copy link
Collaborator

@conbrad conbrad commented Oct 29, 2021

Calling get on a mutable hashmap creates an immutable borrow, calling insert on a mutable hashmap reference creates a mutable borrow. Rust doesn't like both, see: rust-lang/rust#59159

Fix by cloning reference returned by get.

@conbrad conbrad self-assigned this Oct 29, 2021
@conbrad conbrad merged commit ae5a9d3 into main Oct 30, 2021
@compscidr compscidr deleted the chore/fix-mutable-borrow branch August 21, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants