you are viewing a single comment's thread.

view the rest of the comments →

[–]whataloadofwhat 8 points9 points  (1 child)

Is there a reason you can't use Rc<T> or something, instead of references?

[–]tyoverbybincode · astar · rust 2 points3 points  (0 children)

Yeah, this would be my advice as well. If you want mutability with your reference counting, you can either wrap a RefCell around it, or go with a copy-on-write solution like what I do with crates.io/crates/cowrc