Skip to content
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

[1]Tried to Eliminate the need for Copy in the used types #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

davids91
Copy link

@davids91 davids91 commented Apr 25, 2023

I tried to eliminate the Copy requirement from the Node, but realized it is required for the LOD logic of it all.. I did some minor changes anyway, I hope you'll see those as improvements nonetheless!

@davids91 davids91 force-pushed the feature/no-copy branch 4 times, most recently from d643802 to db9cda9 Compare April 26, 2023 04:26
src/node.rs Outdated
Comment on lines 179 to 180
// move current data to appropriate child ???
let data = std::mem::replace(&mut self.ty, NodeType::Internal);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I have had the understanding that whenever a Leaf node is "promoted" to an internal or simplified Node ( not sure which tbh ), its data will be moved to the child where most appropriate; I just don't understand which child may that be?

Or the data is supposed to be duplicated at this time?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I think I got why copy is needed

@davids91 davids91 changed the title Eliminated the need for Copy in the used types Tried to Eliminate the need for Copy in the used types Apr 26, 2023
@davids91 davids91 changed the title Tried to Eliminate the need for Copy in the used types [1]Tried to Eliminate the need for Copy in the used types May 4, 2023
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