Re: [rust-dev] What do I do if I need several &muts into a struct?

2014-06-20 Thread Niko Matsakis
On Mon, Jun 16, 2014 at 09:59:45PM +0100, Vladimir Pouzanov wrote: > Everything works fine up to the point of references. References allow some > nodes to modify other nodes. So, the first pass — I parse that snippet into > PlatformTree/Nodes struct. Second pass — I walk over the tree and for each

[rust-dev] What do I do if I need several &muts into a struct?

2014-06-16 Thread Vladimir Pouzanov
I have a problem figuring the reasonable data access pattern for my code, here's a brief description. I have a tree structure where each node has a path and an optional name. Path is used to locate the node in tree hierarchy, names are stored in a flat namespace as node aliases: lpx17xx@mcu { cl