Skip to content

Conversation

@semihbkgr
Copy link

In the explanation of deref coercion and turbofish, the &node introduces an extra level of indirection by taking a reference to &Node<T>. Since Rust's deref coercion can handle this automatically, the closure can be simplified to |node| node, allowing Rust to directly dereference the Box and return &Node<T>. I’m unsure whether this was added intentionally, but it was a part that confused me while reading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant