Skip to content

How to change mutable state on Server? #1094

Answered by davidpdrsn
Cosmoflips asked this question in Q&A
Discussion options

You must be logged in to vote

lock gives you a mutable reference even through a &self

let mut node = self.node.lock().await;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Cosmoflips
Comment options

@davidpdrsn
Comment options

Answer selected by Cosmoflips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants