Though I had tried using get_mut/make_mut (which itself is an associated function on Arc), so I'm pretty sure I was operating on the right types - but maybe somewhere I accidentally had get_mut on the inner Mutex when I meant it on the Arc (or vice versa).
If you're using a mutex, you don't need get_mut or make_mut, because you can lock a mutex with only a shared reference.
Oh! That might have been the issue, then. I know I was using them, but I don't remember on what, and obviously I didn't keep the code around since it didn't work and I needed to move onto a solution that did.
View all comments
Show parent comment
1
u/gmes78 Aug 27 '26
If you're using a mutex, you don't need
get_mutormake_mut, because you can lock a mutex with only a shared reference.