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

feat: I/O safety for 'sys/sendfile' #1926

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

SteveLauC
Copy link
Member

What this PR does:

  1. Adds I/O safety for module sys/sendfile.

@SteveLauC SteveLauC force-pushed the io-safety-sys/sendfile branch from 58cd780 to 31c4dec Compare December 8, 2022 07:34
pub fn sendfile(
out_fd: RawFd,
in_fd: RawFd,
pub fn sendfile<F1: AsFd, F2: AsFd>(
Copy link
Member Author

@SteveLauC SteveLauC Dec 8, 2022

Choose a reason for hiding this comment

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

Two generic types are needed as in_fd and out_fd may be different types when used.

@SteveLauC SteveLauC mentioned this pull request Dec 8, 2022
29 tasks
@SteveLauC SteveLauC force-pushed the io-safety-sys/sendfile branch from 31c4dec to d53db5c Compare December 8, 2022 10:28
src/sys/sendfile.rs Outdated Show resolved Hide resolved
@SteveLauC SteveLauC force-pushed the io-safety-sys/sendfile branch from d53db5c to ab5c032 Compare December 9, 2022 03:50
Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit 3d3e6b9 into nix-rust:master Dec 9, 2022
@SteveLauC SteveLauC deleted the io-safety-sys/sendfile branch December 10, 2022 00:50
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.

2 participants