-
Notifications
You must be signed in to change notification settings - Fork 65
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 ToOwned for Event<&'a OsStr>
#178
Comments
Looks like the proper fix is going to be pending future rust releases, per
For now I will make into_owned available outside of the stream feature then. |
Hi @i509VCB, thank you for your pull requests! I'm currently on vacation, but I'll be back next week and will take a look then (or maybe the week after, if there's too much of a backlog to catch up on). |
Ah no worries |
#179 has been merged, which is a partial resolution to this issue. |
I was curious about this, and from this StackOverflow question it sounds like it is not really needed to implement the I am not familiar with the calloop crate, but a search over its GitHub source does not find any references to the |
So in the case of calloop, I need to have an owned event since an event source in calloop has an Event assoicated type. If the assoicated type has a lifetime, then it gets quite ugly fast. |
The Reading the SO question again, it sounds like
Edit: That last paragraph didn't make sense as |
Okay, I now understand what was meant by this change "pending future Rust releases," presumably referring to impl specialization and RFC 1210. So hypothetically if/when RFC 1210 stabilizes then it will be possible to implement |
Thank you for looking into this, @talklittle! I've looked at the documentation of Closing this issue. @i509VCB, feel free to reopen, if you disagree. |
I am using inotify with calloop and one issue I've noticed is the lack of ability to easily convert an event from the methods into an owned event to pass to calloop. Calloop gets kinda messy when an
Event
in an event source has a lifetime, so getting an owned copy is typically the best way around this issue.I noticed the presence of
into_owned
that is only available with the streams api, I think we could convert this to delegate to an implementation ofToOwned
and made always available.The text was updated successfully, but these errors were encountered: