You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aim is again to simplify the LayoutTree trait by removing unncessary methods. In this case, it is achieved by making the generic compute/mod and leaf compute functions take &mut Taffy instead of &mut impl LayoutTree. This works because these methods are private, and are only used when using the built in Taffy tree anyway.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I noticed that we seem to be using the terms "node", "key" and "node id" to refer to the same thing (a NodeId), perhaps in a future PR we should try to make the variable names more consistent here
I noticed that we seem to be using the terms "node", "key" and "node id" to refer to the same thing (a NodeId), perhaps in a future PR we should try to make the variable names more consistent here
key is different as it's a slotmap::DefaultKey, which we still need to use internally in the tree code (but not the compute code) as we're still using slotmaps for storage. But agree totally on node and node_id. I think we should be using node_id (or even just id) anytime the variable is a NodeId. But there's just a lot of places to update so it might takes a while to go through and update everything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
breaking-changeA change that breaks our public interfaceusabilityMake the library more comfortable to use
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
The aim is again to simplify the
LayoutTreetrait by removing unncessary methods. In this case, it is achieved by making the genericcompute/modandleafcompute functions take&mut Taffyinstead of&mut impl LayoutTree. This works because these methods are private, and are only used when using the built inTaffytree anyway.Context
Split out from #326
Feedback wanted
General PR review.