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

Allow unsized handle types for Arc and Rc #75

Merged
merged 2 commits into from Nov 21, 2021

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Nov 19, 2021

Lower bounds of HasRawWindowHandle impls of Arc and Rc to allow unsized types.

This allows to use eg Arc<dyn HasRawWindowHandle + Send + Sync>, which is nice to avoid generics.

However this is not done on references because it is a fundamental type, so lowering the bound is a breaking change.

@Lokathor
Copy link
Contributor

if it weren't a breaking change would we also want this on references? It seems like yes.

@a1phyr
Copy link
Contributor Author

a1phyr commented Nov 19, 2021

I think that we eventually want it on references. In addition to the above advantage about avoiding generics, it costs nearly nothing, doesn't make the crate harder to maintain but makes it more consistent.

@Lokathor Lokathor merged commit ada11a1 into rust-windowing:master Nov 21, 2021
@a1phyr a1phyr deleted the unsized_handle branch November 25, 2021 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants