#Implementing Binary Search Tree
10 messages · Page 1 of 1 (latest)
Though you might need some take dances
I'm trying to see if I can make a minimal example
Hmm, without knowing what your tree looks like, this is difficult
I have a gut feeling that you might want to use Option::take or mem::take to temporarily remove a/the subtree/s from the parent/s, then manipulate them freely
Do you happen to have a runnable example? Or at least, to be able to share what the definition of self looks like?
Alright, so, I've isolated the minimal code, I think. The catch is, it compiles (after removing the pseudocode) so I'm not entirely sure what your issue is 🙂
Ah yeah, I see the issue lol
A failed attempt would be easier
I'm not that familiar with trees, so I'm having trouble with that part, though I could probably understand enough to fix a borrowck error in otherwise working code