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

Remove more instances of Unpin #403

Merged
merged 1 commit into from Nov 7, 2020
Merged

Conversation

e00E
Copy link
Contributor

@e00E e00E commented Nov 6, 2020

Not required for Transport but I thought I'd clean up all of the remaining Unpin instances (except for ws.rs).

@@ -229,10 +229,13 @@ impl<T> Response<T> {
}
}

// We can do this because `hyper::client::ResponseFuture: Unpin`.
impl<T> Unpin for Response<T> {}
Copy link
Owner

Choose a reason for hiding this comment

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

What about T?

Copy link
Contributor Author

@e00E e00E Nov 6, 2020

Choose a reason for hiding this comment

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

If we trust the compiler then this must be okay because it does compile and there is no unsafe. I think this is because we never construct a Pin<T> so whether T is Unpin doesn't matter. Although I am not sure why the compiler doesn't automatically implement Unpin in this case.

@tomusdrw tomusdrw merged commit c48edc1 into tomusdrw:master Nov 7, 2020
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.

None yet

2 participants