Something that we need to do for our link list is we need to implement the drop tree so we can do that
by saying t drop for list T, And the reason we need to implement the drop trait for our list is because
the drop would be done recursively.
So if you think about it, if we if we drop here.
So so let's say we drop three.
Well three is going to then drop to two isn't going to drop one.
Well this sounds an awful lot like recursion.
Well, imagine if we had a really large list that we're doing this recursive drop on.
What what could happen with a large list that is recursively being dropped?
Well, the recursion could potentially blow the stack up, and that is really bad.
So what we need to do is we need to do an iterative drop to avoid using the recursive drop.
So for us to do that, we're going to need to implement in the drop method.
And here we'll say let a mutable link equal to self head take.
So take the head and then while let some and then we'll say mute boxed node is going to equal our link.
And then inside this code block we're going to say link is equal to box node dot, next dot take.
So what we're doing here is we're going to do an iterative drop.
That way, we don't have any chance to blow our stack using the recursive drop that rust would have
done for us had we not implemented in our own drop.
So that is just something that I wanted to point out that we needed to do in case our list ever grew
to a large enough size where a recursive drop would have caused our stack to blow up.
So in the next lecture, we're going to start looking at implementing an additional methods for our
linked list.