Skip to content

Wrap IntoFuture around Cancellable::future #1709

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

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

swsnr
Copy link
Contributor

@swsnr swsnr commented Apr 27, 2025

Implement IntoFuture for Cancellable as a dead-simple wrapper around the existing Cancellable::future.

Closes #1512

@swsnr
Copy link
Contributor Author

swsnr commented Apr 27, 2025

I missed this, and found #1512 tracking this.

Opening as draft, because #1512 suggests to make future obsolete in favour of IntoFuture for &Cancellable. Should I add that impl as well, and deprecate or remove Cancellable::future?

Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this seems OK for now. We can deprecate it at a later time when this has proven itself.

Implement IntoFuture for Cancellable and &Cancellable as a dead-simple
wrapper around the existing Cancellable::future.

See gtk-rs#1512
@swsnr swsnr force-pushed the 1512-cancellable-into-future branch from 14bf64f to b57792d Compare April 27, 2025 09:05
@swsnr
Copy link
Contributor Author

swsnr commented Apr 27, 2025

@sdroege Okay, I added an impl for &Cancellable, marked it as ready, and referenced #1512

@swsnr swsnr marked this pull request as ready for review April 27, 2025 09:05
@sdroege sdroege merged commit 10e4c61 into gtk-rs:main Apr 27, 2025
47 of 48 checks passed
@swsnr swsnr deleted the 1512-cancellable-into-future branch April 27, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] IntoFuture for gio::Cancellable
2 participants