This pr fixes incorrect output of sibling iteration methods when there's no parent.
To achieve this I pulled out the code for first/last sibling and then simplified the appropriate methods.
I also added a simple test to verify this works.
I also ran cargo fmt and cargo clippy addressing each of the issues. Those two steps are in previous commits which hopefully can be viewed separated. I tried to make a stacked PR but it looks like that only works in the same repository.
This pr fixes incorrect output of sibling iteration methods when there's no parent.
cargo fmt
andcargo clippy
addressing each of the issues. Those two steps are in previous commits which hopefully can be viewed separated. I tried to make a stacked PR but it looks like that only works in the same repository.