-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 read_exact_at and write_all_at methods to FileExt on unix #51809
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @bluss (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Reassigning as advised on Discord. |
Looks great to me, thanks! Mind opening a tracking issue and filling in the number? I can take care of the necessary tags on the issue |
@alexcrichton great, thanks! Opened #51984 and added a commit filling it in. |
@bors: r+ |
📌 Commit 73166f7 has been approved by |
@bors rollup |
Add read_exact_at and write_all_at methods to FileExt on unix This PR adds `FileExt::read_exact_at()` and `FileExt::write_all_at()`, which are to `read_at()` and `write_at()` as `read_exact()` and `write_all()` are to `read()` and `write()`. This allows the user to not have to deal with `ErrorKind::Interrupted` and calling the functions in a loop. I was unsure as to how to mark these new methods so I marked them `unstable`, please let me know if I should have done it differently. I asked in Discord and was told that as this change is small it does not require an RFC.
Add read_exact_at and write_all_at methods to FileExt on unix This PR adds `FileExt::read_exact_at()` and `FileExt::write_all_at()`, which are to `read_at()` and `write_at()` as `read_exact()` and `write_all()` are to `read()` and `write()`. This allows the user to not have to deal with `ErrorKind::Interrupted` and calling the functions in a loop. I was unsure as to how to mark these new methods so I marked them `unstable`, please let me know if I should have done it differently. I asked in Discord and was told that as this change is small it does not require an RFC.
Add read_exact_at and write_all_at methods to FileExt on unix This PR adds `FileExt::read_exact_at()` and `FileExt::write_all_at()`, which are to `read_at()` and `write_at()` as `read_exact()` and `write_all()` are to `read()` and `write()`. This allows the user to not have to deal with `ErrorKind::Interrupted` and calling the functions in a loop. I was unsure as to how to mark these new methods so I marked them `unstable`, please let me know if I should have done it differently. I asked in Discord and was told that as this change is small it does not require an RFC.
Rollup of 13 pull requests Successful merges: - #51548 (Initialize LLVM's AMDGPU target machine, if available.) - #51809 (Add read_exact_at and write_all_at methods to FileExt on unix) - #51914 (add outlives annotations to `BTreeMap`) - #51958 (Show known meta items in unknown meta items error) - #51973 (Make Stdio handle UnwindSafe) - #51977 (bootstrap: tests should use rustc from config.toml) - #51978 (Do not suggest changes to str literal if it isn't one) - #51979 (Get rid of `TyImplTraitExistential`) - #51980 (Emit column info in debuginfo for non msvc like targets) - #51982 (incr.comp.: Take names of children into account when computing the ICH of a module's HIR.) - #51997 (add entry for cargo-metadata feature to RELEASES) - #52004 (toolstate: Fixed detection of changed submodule, and other fixes.) - #52006 ( Change --keep-stage to apply more often) Failed merges: r? @ghost
This PR adds
FileExt::read_exact_at()
andFileExt::write_all_at()
, which are toread_at()
andwrite_at()
asread_exact()
andwrite_all()
are toread()
andwrite()
. This allows the user to not have to deal withErrorKind::Interrupted
and calling the functions in a loop.I was unsure as to how to mark these new methods so I marked them
unstable
, please let me know if I should have done it differently.I asked in Discord and was told that as this change is small it does not require an RFC.