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

Make Sink and future-util optional #143

Closed

Conversation

stackinspector
Copy link
Contributor

fixs #142

Copy link
Owner

@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.

Looks mostly good, thanks!

In addition to these comments, can you also clean up the commit history? Just push --force to this PR afterwards.

Cargo.toml Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
#[cfg(not(feature = "sink"))]
impl<S> WebSocketStream<S> {
/// Simple send method to replace `futures_sink::Sink` (till v0.3).
pub async fn send(&mut self, msg: Message) -> Result<(), WsError>
Copy link
Owner

Choose a reason for hiding this comment

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

Doesn't hurt to provide this always, and should make sure that both this and the Sink impl are covered by the tests and running on the CI

Copy link
Owner

Choose a reason for hiding this comment

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

I think apart from this one it's all ready

Copy link
Owner

Choose a reason for hiding this comment

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

The new function is already used by everything (e.g. the autobahn tests). Maybe you can change it so that the server uses Sink::send and the client the new function (together with a comment why this is done)

src/lib.rs Outdated Show resolved Hide resolved
@stackinspector
Copy link
Contributor Author

can you also clean up the commit history?

I prefer to keep the full history in my repo, even if merging my partner's code goes messy due to less experience. You can choose to squash and merge to avoid bringing those messy commits into the mainline.

@stackinspector
Copy link
Contributor Author

btw If a new and better Sink API is introduced in the future, the name of the feature will be ambiguous. Perhaps a more appropriate name for the feature is futures-03-sink, as is customary in the async Rust ecosystem.

@sdroege
Copy link
Owner

sdroege commented Dec 5, 2024

btw If a new and better Sink API is introduced in the future, the name of the feature will be ambiguous. Perhaps a more appropriate name for the feature is futures-03-sink, as is customary in the async Rust ecosystem.

That sounds like a good idea

src/compat.rs Show resolved Hide resolved
@sdroege
Copy link
Owner

sdroege commented Dec 7, 2024

I prefer to keep the full history in my repo, even if merging my partner's code goes messy due to less experience. You can choose to squash and merge to avoid bringing those messy commits into the mainline.

I've put a version with cleaned up history here: #144

Let me know if you want to change the commit message.

@sdroege
Copy link
Owner

sdroege commented Dec 8, 2024

Merged as part of #144

@sdroege sdroege closed this Dec 8, 2024
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.

3 participants