taffy icon indicating copy to clipboard operation
taffy copied to clipboard

Use `SecondaryMap` instead of `SlotMap`

Open test3211234 opened this issue 5 months ago • 0 comments

What problem does this solve or what need does it fill?

Since it's additional data, I thought SecondaryMap should be used instead of SlotMap here:

https://github.com/DioxusLabs/taffy/blob/9915b967e9809dc57f210de8fe5f7510e66806d6/src/tree/taffy_tree.rs#L137C5-L145C50

What solution would you like?

Use SecondaryMap. Look at Floem:

https://github.com/lapce/floem/blob/919a62c51c208cf9401edd78a08849d5629bb442/src/view_storage.rs#L15C5-L17C61

What alternative(s) have you considered?

N/A

Additional context

N/A

test3211234 avatar Sep 02 '24 20:09 test3211234