-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
Debug NodeRef Warning (#2414) #2467
Conversation
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.
Thanks for working on this! I proposed a few small changes in the comments above. Much appreciated as always.
Sorry for the late reply There is a small nuance here. This directive is dropped for a debug build
I have to do it by adding a
|
In production #[repr(transparent)] is use to ensure a compact representation in memory. In developement the memory is slightly expanded.
59d8faf
to
f3ef5a5
Compare
I recently, rebased and force pushed - as I think it will fix build errors |
To be honest I think the CI is just unhappy |
…]. Also fixed create_node_ref.
Ok this next version looks much less like a dogs breakfast
That was the key to this, that I was not seeing ... thank you - thank you |
Thanks very much for the contribution, and for your patience through all the back and forth! |
This is a response to #2414
In production #[repr(transparent)] is use to ensure a compact representation in memory.
In developement the memory is slightly expanded.
Things I am thinking about
A) I have introduced a maintence hazard... the documentation block for NodeRef is repeated twice
So any future PRs will have to make sure things are kept in sync.
I would love to avoid that...
B) I may have been over eager.. ( adding #[track_caller ] in too many places. )
impl<T: ElementDescriptor> Clone for NodeRef {
#[track_caller]
fn clone(&self) -> Self {
*self
}