-
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
Cursor.rs documentation fix #122512
Cursor.rs documentation fix #122512
Conversation
… documentation clearly states that negative indexes will cause error. Just making the code in the example to return Result::Ok, instead of Result::Error.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Nilstrieb (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
thanks! |
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#114651 (rustdoc: add `--test-builder-wrapper` arg to support wrappers such as RUSTC_WRAPPER when building doctests) - rust-lang#122468 (Cleanup `MirBorrowckCtxt::prefixes`) - rust-lang#122496 (Greatly reduce GCC build logs) - rust-lang#122512 (Cursor.rs documentation fix) - rust-lang#122513 (hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id`) - rust-lang#122530 (less symbol interner locks) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122512 - baitcode:2024-03-14-buffer-documentation-fix, r=Nilstrieb Cursor.rs documentation fix Reason: I've been learning Rust std library and got confused. Seek trait documentation clearly states that negative indexes will cause an error. And the code in the Cursor example uses negative index. I found myself trying to understand what am I missing until I've actually executed the code and got error. I decided to submit small fix to the documentation.
Reason:
I've been learning Rust std library and got confused. Seek trait documentation clearly states that negative indexes will cause an error. And the code in the Cursor example uses negative index. I found myself trying to understand what am I missing until I've actually executed the code and got error. I decided to submit small fix to the documentation.