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

fix(client): adjust TransportSenderT #852

Merged
merged 10 commits into from
Aug 12, 2022
Merged

Conversation

niklasad1
Copy link
Member

This is trait contains WebSocket specific details and it's difficult to fix it properly with an extension trait
in the current design.

So this PR documents and marks it clearly that these methods are optional to implement, kind of ugly but better.

This is trait contains `WebSocket` specific details and it's difficult to fix it properly with an extension trait
in the current design.

So this PR documents and marks it clearly that these methods are optional to implement, kind of ugly but better.
@niklasad1 niklasad1 requested a review from a team as a code owner August 11, 2022 09:15
core/src/client/mod.rs Outdated Show resolved Hide resolved
core/src/client/mod.rs Outdated Show resolved Hide resolved
niklasad1 and others added 2 commits August 11, 2022 12:40
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
@lexnv
Copy link
Contributor

lexnv commented Aug 11, 2022

The multiple_blocking_calls_overlap test causes the CI to fail, which is highly sensitive
to scheduling noise.

thread 'multiple_blocking_calls_overlap' panicked at 'Expected less than 60ms, got 63.3412ms'

I suggest increasing the threshold to 80ms for this case 😄

core/src/client/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: James Wilson <james@jsdw.me>
Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

I like that the default impls don't fail now; it makes much more sense to have default impls when they can safely be ignored if the implementor doesn't care about that functionality :)

For that reason, I'm not sure they need the optional_ prefix; they are optional now in the same way that any trait fn with a default impl is, so I don't think the prefix adds anything.

@niklasad1
Copy link
Member Author

For that reason, I'm not sure they need the optional_ prefix; they are optional now in the same way that any trait fn with a default impl is, so I don't think the prefix adds anything.

Removed it now, I guess the documentation is clear enough now so we don't need that.
I was almost considering doing doc(hidden) to hide this from other users but I think this should be ok.

@niklasad1 niklasad1 merged commit 1fbaf45 into master Aug 12, 2022
@niklasad1 niklasad1 deleted the na-cleanup-client-trait branch August 12, 2022 15:16
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