-
Notifications
You must be signed in to change notification settings - Fork 173
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
Get rid of the lifetime on DataPayload/DataProvider/DataExporter #1297
Conversation
where | ||
M: DataMarker, | ||
{ | ||
RcStruct(Yoke<M::Yokeable, ErasedCart<'data>>), | ||
RcStruct(Yoke<M::Yokeable, ErasedCart<'static>>), |
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.
I didn't remove the lifetime from ErasedCart since I'll probably do that when we remove RcStruct (and move ErasedStruct to yoke)
use crate::data_provider::{DataPayloadInner, ErasedCart}; | ||
let yoke: Yoke<_, ErasedCart> = match other.inner { | ||
DataPayloadInner::RcStruct(yoke) => { | ||
let rc: Rc<Yoke<_, _>> = Rc::from(yoke); | ||
let yoke = | ||
Yoke::attach_to_rc_cart(rc.clone() as Rc<dyn SerdeSeDataStruct<'data> + 'data>); | ||
Yoke::attach_to_rc_cart(rc.clone() as Rc<dyn SerdeSeDataStruct<'static>>); |
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.
Request: Try to see if it's possible to get rid of the lifetime on SerdeSeDataStruct
.
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.
I plan to do this immediately in a followup, this change was not necessary to land the rest of this so I didn't do it.
72d6805
to
e50292e
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
e50292e
to
ac743cb
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Progress on #1262
RcStruct
is now pretty useless but this PR doesn't yet remove it to reduce the amount of actual changes.The actual changes here are:
DataPayload
,DataProvider
,DataExporter
no longer have lifetimes (and as a result all the formatters/etc don't either)Everything else is mostly just updates to bring the uses of these types in line with the changes