How to implement an iterator of mutable references to the values in the right edges of a Binary Search Tree?

后端 未结 2 1886
孤独总比滥情好
孤独总比滥情好 2021-01-13 10:38

I implemented a simple Binary Search Tree in Rust (following CIS 198, it\'s great), and for learning I\'m doing iterators that just run through the right edges.

I c

2条回答
  •  悲哀的现实
    2021-01-13 11:13

    I think you cannot split self into 2 mutable objects (one for the Item, one for self itself) without using some unsafe code.

提交回复
热议问题