-
Notifications
You must be signed in to change notification settings - Fork 44
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
Implement instance cloning methods in WeakDom #312
Conversation
Looking good!
No longer have to take &mut self for clone_into_external
rbx_dom_weak/src/dom.rs
Outdated
} | ||
|
||
ctx.ref_rewrites.insert(original_ref, new_ref); | ||
builder |
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.
This builder never has any children and kinda makes me want a fast path in WeakDom::insert
that doesn't create a VecDeque
for builders with no children - kind of irrelevant for this PR, but I'll put it on my back burner...
CloneContext is still sorta POD...
CloneContext definitely ain't no POD anymore It was nice while it lasted...
Currently fails because the rewrite_refs implementation in a253fef rewrites all refs that point outside the cloned subtree to none, which is not correct Revert "Fix ref rewrites" This reverts commit 41a2fe6f1418a48e86d622a336854f9276977c38.
Can you add these to the Changelog also? |
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.
LGTM
Closes #282 by implementing
WeakDom::clone_within
andWeakDom::clone_into_external
.