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

Use ToOwned and Borrow traits when generating futures. #589

Merged
merged 1 commit into from Apr 23, 2018

Conversation

Projects
None yet
3 participants
@tmiasko
Copy link
Contributor

tmiasko commented Apr 23, 2018

Replace cloned() with to_owned() to handle situations where borrowed
type is different from the owned one. The cloned() method supports only
the case of &T -> T.

Borrow trait is used to perform analogous work in other direction.

Tomasz Miąsko
Use ToOwned and Borrow traits when generating futures.
Replace cloned() with to_owned() to handle situations where borrowed
type is different from the owned one. The cloned() method supports only
the case of &T -> T.

Borrow trait is used to perform analogous work in other direction.
@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Apr 23, 2018

Looks good to me and a bit simpler/more generic indeed. Not sure how I forgot about that 👍

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Apr 23, 2018

@tmiasko Thanks,

@EPashkin EPashkin merged commit da6ce06 into gtk-rs:master Apr 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

vhdirk pushed a commit to vhdirk/gir that referenced this pull request Jul 6, 2018

Merge pull request gtk-rs#589 from tmiasko/to-owned-borrow
Use ToOwned and Borrow traits when generating futures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.