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

Add splice and sendfile #151

Merged
merged 3 commits into from
Jan 29, 2023
Merged

Add splice and sendfile #151

merged 3 commits into from
Jan 29, 2023

Conversation

carbotaniuman
Copy link
Contributor

Adds splice and sendfile, as those got added sometime in when I last looked at this and now.

I'm very unsure of all the unsigned to signed conversions and back here, and I'm not really sure why rustix has offsets as unsigned here.

I've uncommented the tests, but strangely enough I don't think that tests actually tests the splice or sendfile path, as those appear locked behind benches. I will add some tests for this.

@sunfishcode
Copy link
Owner

Rustix uses unsigned offsets to be consistent with std::io::SeekFrom using unsigned, when talking about an offset from the start of a file. That's a debatable choice, but it's the choice that was made.

@sunfishcode
Copy link
Owner

This looks good to me; it just needs a rustfmt now.

@sunfishcode sunfishcode merged commit bf6b53a into sunfishcode:main Jan 29, 2023
@sunfishcode
Copy link
Owner

Thanks!

@sunfishcode sunfishcode mentioned this pull request Mar 29, 2023
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