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

DEV: add test case covering partial writes #963

Closed
wants to merge 1 commit into from

Conversation

SamSaffron
Copy link
Contributor

This moves the responsibility of copying data into write_to_socket. The
caller never mutates the string, this is cleaner cause we do no longer
mutate the string we pass in.

This moves the responsibility of copying data into write_to_socket. The
caller never mutates the string, this is cleaner cause we do no longer
mutate the string we pass in.
@byroot
Copy link
Collaborator

byroot commented Nov 19, 2020

The test looks good.

The caller never mutates the string

I think it probably should for performance reason. Using slice! we could avoid creating lots of strings. But I'd need to setup a benchmark.

@byroot
Copy link
Collaborator

byroot commented Nov 20, 2020

Closing in favor of #964

@byroot byroot closed this Nov 20, 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