-
Notifications
You must be signed in to change notification settings - Fork 155
Add height to tap tree #588
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
Conversation
0ae4b40
to
c960798
Compare
In 37fea86 you rename two methods -- we should add a deprecated version under the old name. (One gets renamed again in the last commit :) we only need to keep the original name.). Otherwise c960798 looks good, I think. I'm a little uncomfortable adding a public field which can be constructed in an incorrect way, but I think it's okay for now. In general I'd like to go through this library and make things non-constructable, but that's a much bigger change and I don't have a timeline for it. |
Re deprecation, can do. Re renaming twice, sorry about that :) I'll put a bit more effort in and re-spin. |
This is a private function on the `TapTree` struct, we can make the name more terse with no loss of meaning.
We use `TapTree` therefore the all lowercase version should be `tap_tree` not `taptree`.
c960798
to
88f96d3
Compare
Use the descriptor string currently in the unit tests and add a basic test of `tap_tree_height`. Done in preparation for adding a height field to the tap tree.
Currently calculating the height of a `TapTree::Tree` uses a recursive call, we can optimize this out by storing the height along with the tree nodes. Convert the `TapTree::Tree` tuple struct to a struct with named fields. Include a `height` field in the new struct.
88f96d3
to
476e358
Compare
Changes in force push:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 476e358
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 476e358
I stumbled across a
todo
in the code last week and thought I'd hack it up.tap_tree_height
From commit log of patch 3