RefCell-less use_mut_ref #3546
ColonelThirtyTwo
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
How do you this should be be implemented? I can't think of a way to handle mutability without RefCell here |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
use_mut_ref
forcibly wraps the value in aRefCell
, which is sometimes not ideal and isn't an obligation (next_state
returns anRc<T>
). In particular, if the inner structure needs to split up access into multipleRefCell
s to partition access, or uses other methods of interior mutability, the top-levelRefCell
is just extra overhead.Beta Was this translation helpful? Give feedback.
All reactions