-
Notifications
You must be signed in to change notification settings - Fork 276
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double linked list #57
Comments
I'm thinking about trying to use |
Weak lets you implement it safely. I'm not sure what you're proposing? THere already is an impl of a DLL here. There's also one in the stdlib. |
It seems I miss something. Trivial reference counting can't handle cycles. And DLL is the minimum possible cycle (graph of two objects). Right? And UPD: Yes I see impl<T> Drop for List<T> {
fn drop(&mut self) {
while self.pop_front().is_some() {}
}
} doing the trick. I just thought that |
First of all: thank a lot. I enjoyed reading this manual.
I cheated a bit and googled for "rust double linked list". There is seems to be solution to problem of who is owning who: stackoverflow.
Second link it to your website e.g.
cglab.ca/~abeinges/blah/too-many-lists/book/
The text was updated successfully, but these errors were encountered: