-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Feature/nth back chunks #60545
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
Closed
Closed
Feature/nth back chunks #60545
Changes from 1 commit
Commits
Show all changes
318 commits
Select commit
Hold shift + click to select a range
fc34d5f
Removed unneccesary reference for trait name
jespersm 6802082
Hash all of the import_ids for the TraitCandidate.
jespersm 6da7649
Delegate SmallVec's stable_hash to array's stable_hash.
jespersm f5b5ca8
Revert Cargo.lock changes accidentally introduced during rebase
petrochenkov 3e6787c
Early error for mixing order of const and type parameters
varkor 747dd57
Auto merge of #60415 - jespersm:pr_unused_import_45268, r=petrochenkov
bors a823fa4
Auto merge of #60476 - froydnj:aarch64-profiling, r=alexcrichton
bors 121caa9
Correct handling of arguments in async fn
taiki-e c55b68a
Auto merge of #60508 - varkor:const-generics-fold-ct-err, r=petrochenkov
bors d65e721
Auto merge of #60525 - eddyb:namespaces-not-kinds, r=petrochenkov
bors e6da57f
Fix argument alias handling for -O and -C opt-level
varkor e8e43c9
Fix argument alias handling for -g and -C debuginfo
varkor 11b1d48
Add a run-make test for command aliases
varkor d54cf00
Add comments
varkor ecd0468
Update getopts to 0.2.19
varkor 12f63ec
Move run-make test to run-make-fulldeps
varkor 80f54ba
Update Cargo.lock
varkor 5d8fd98
Auto merge of #60544 - petrochenkov:parder, r=eddyb
bors 57ec63c
Add tests for by-ref binding
taiki-e c6b1698
Auto merge of #60541 - RalfJung:miri-visitor-generators, r=oli-obk
bors 125dc60
rustc: replace uses of with_freevars with the freevars query.
eddyb 8d9f4a1
rustc: rename all occurences of "freevar" to "upvar".
eddyb 91e0c25
Update mailmap to proper syntax
Mark-Simulacrum 968eb7f
code review fixes
saleemjaffer d628c2e
Auto merge of #60237 - saleemjaffer:issue-56166-miri-fntype-arg-passi…
bors 577b0b9
Rollup merge of #60131 - agnxy:doc-link, r=ehuss
Manishearth a8ed677
Rollup merge of #60426 - varkor:fix-duplicate-arg-handling, r=alexcri…
Manishearth d475c4e
Rollup merge of #60515 - euclio:div-in-heading, r=GuillaumeGomez
Manishearth 2c7712b
Rollup merge of #60530 - eddyb:unfreevars, r=oli-obk
Manishearth ff7ef11
Rollup merge of #60536 - brainplot:fix-unicode-character, r=dtolnay
Manishearth dc54cd0
fix typo in enum variant name
RalfJung 40bd145
Auto merge of #60567 - Manishearth:rollup-rjagqnw, r=Manishearth
bors 764e366
to_xe_bytes for isize and usize returns an array of different size
stepancheg 46d0ca0
Auto merge of #60261 - matklad:one-escape, r=petrochenkov
bors eda0699
Auto merge of #60569 - RalfJung:miri-visitor-generators, r=Centril
bors 7ac0200
Auto merge of #60436 - Xanewok:update-rls, r=Manishearth
bors d98a165
Auto merge of #60565 - Mark-Simulacrum:mailmap-fixes, r=pietroalbini
bors 97d3ad0
Only hash dep node indices of deps of anon tasks
Zoxc c3694e5
Rename `ParamTy::idx` to `ParamTy::index`
varkor 638d1d3
Remove duplicate comment
varkor 59ebd1b
Shift const vars through binders
varkor ad78fcf
Ignore const parameters when constructing type bounds in rustdoc
varkor c619754
Implement TypeFoldable for InferConst
varkor 670cf11
Clean up `push_const_name`
varkor c0454f0
Remove incorrect FIXME
varkor c3b8ab5
Auto merge of #60337 - fabric-and-ink:hiridification, r=Zoxc
bors 5fc0395
Resolve a couple of `unimplemented!()`s
varkor 9a2772a
Implement `ToTrace` for `ty::Const`
varkor 594685b
`token::LArrow` can begin arguments
varkor e570fe5
Remove resolved FIXME
varkor a19cf18
Auto merge of #53645 - varkor:const-generics-redux, r=eddyb
bors 6d26c5f
rustfmt
mark-i-m 9a0a87a
Revert "Disable big-endian simd in swap_nonoverlapping_bytes"
cuviper f64ed09
Auto merge of #60526 - alexcrichton:wasm-main-symbols, r=oli-obk
bors a416a19
Add test for current behaviour.
davidtwco 54430ad
review comments: fix typo and add comments
estebank 9a2ee0a
serialize: add missing Encodable impl for Path.
eddyb eeedd3a
Auto merge of #60531 - Centril:sort-features, r=oli-obk
bors fc72e56
Update cargo
ehuss f0e43fc
compiletest: only use `make_exe_name` for tests that end up being exe…
eddyb 1618c07
rustc: rename -Z emit-directives to -Z emit-artifact-notifications an…
eddyb bb1c67d
rustc_codegen_ssa: emit artifact notifications for the main link prod…
eddyb 2e789b9
Add test for #59972
tmandry c89a131
compiletest: uniformly normalize paths, so they all work on all platf…
eddyb b8fa4cb
Auto merge of #60464 - eddyb:not-overly-specific-pipelining, r=alexcr…
bors 55c48b4
Auto merge of #60596 - ehuss:update-cargo, r=alexcrichton
bors f2919a3
Trust signature over return expr for generators.
davidtwco c6ac575
Auto merge of #60573 - Zoxc:dep-stream-prefix-2, r=michaelwoerister
bors d5e8190
Add a `cast` method to raw pointers.
SimonSapin f5371a5
Auto merge of #60592 - davidtwco:generator-signature-deduction, r=eddyb
bors 1516087
add negative tests for OS X LLVM target changes
froydnj 97ba4c9
choose a more specific LLVM target on OS X when necessary
froydnj b98bf88
Be a bit more explicit asserting over the vec rather than the len
spastorino 17dba3b
Auto merge of #60277 - estebank:relate-ice, r=varkor
bors 4e23358
Rollup merge of #60489 - GuillaumeGomez:remove-hamburger, r=QuietMisd…
Centril 535db2f
Rollup merge of #60535 - taiki-e:async-fn-arguments, r=cramertj
Centril e280818
Rollup merge of #60579 - varkor:typaram-index, r=eddyb
Centril 9995bb5
Rollup merge of #60583 - varkor:const-generics-emplace, r=petrochenkov
Centril 2d6da83
Rollup merge of #60609 - spastorino:be-explicit-on-mem-replace-doc, r…
Centril cfdc84a
Auto merge of #60612 - Centril:rollup-61drhqt, r=Centril
bors fe8760c
Implement built-in await syntax
cramertj 33cde4a
Auto merge of #60586 - cramertj:await, r=oli-obk
bors 606bb6f
avoid extra copy
mark-i-m 5db665b
lots of comments + minor cleanup
mark-i-m 152b26a
submodules: update clippy from fc96aa03 to 341c96af
matthiaskrgr b92d360
Auto merge of #60378 - froydnj:apple-target-modifications, r=michaelw…
bors bfa15f3
Add tests for concrete const types
skinnyBat df5a011
Optimize HIR map
Zoxc c87d2cc
test for #50518
matklad d33db6e
Rename HirMap to HirEntryMap and add some comments
Zoxc d7f4a86
Auto merge of #60246 - Zoxc:hir-map-vec, r=eddyb
bors 47768b2
Document + Cleanup lang_items.rs
Centril 7e80355
std: Update compiler-builtins crate
alexcrichton e65ef96
libprofiler_builtins: Set compilation flags more correctly for C code.
michaelwoerister 0ffc573
AppVeyor: Update clang-cl from 7.0.0 to 8.0.0
michaelwoerister cf0f2b0
pin: make the to-module link more visible
RalfJung e630580
Auto merge of #60626 - matthiaskrgr:submodule_upd, r=oli-obk
bors cc40f41
Instead of ICEing on incorrect pattern, use delay_span_bug
estebank eb7d47c
fix incorrect assert
mark-i-m 3f5152e
Auto merge of #60402 - michaelwoerister:update-profiler-rt-build, r=a…
bors 0fce5c1
Use `delay_span_bug` for "Failed to unify obligation"
estebank 58d39a9
save-analysis: Fix ICE when processing associated constant
Xanewok ee6d315
cleanup: Remove `DefIndexAddressSpace`
petrochenkov d0ba8fe
Skip codegen for one UI test with long file path
petrochenkov 229fff3
Rollup merge of #59979 - stepancheg:num-size, r=ehuss
Centril cfed892
Rollup merge of #60491 - alexcrichton:update-cb, r=nikomatsakis
Centril 59ff113
Rollup merge of #60550 - skinny121:concrete_const_tests, r=varkor
Centril b04f87f
Rollup merge of #60572 - tmandry:issue-59972, r=RalfJung,oli-obk
Centril d20b692
Rollup merge of #60627 - matklad:test, r=estebank
Centril 450ad65
Rollup merge of #60634 - Centril:lang-items-docs, r=oli-obk
Centril 0597292
Rollup merge of #60641 - estebank:defer-ice, r=oli-obk
Centril f683b6b
Rollup merge of #60644 - estebank:abolish-ice, r=varkor
Centril 9f83961
Auto merge of #60651 - Centril:rollup-zoamjfk, r=Centril
bors b9c4301
Inline some Cursor calls for slices
petertodd 028e78d
Stabilize and re-export core::array
JohnTitor d4f071a
ci: update dist-various-2 to ubuntu 18.04
pietroalbini 8f9e90b
ci: use our own mirror for fuchsia's zircon repository
pietroalbini c98a27c
ci: bump ubuntu 18.10 images to 19.04
pietroalbini f3993d0
Fix typo
Zoxc e73ba21
save-analysis: Add UI testsuite
Xanewok ef01f29
Auto merge of #60668 - Zoxc:hir-map-vec, r=matthewjasper
bors 0af18ee
Appease tidy
Xanewok b2f71fb
remove unneeded `extern crate`s from build tools
euclio 8fd5587
Rollup merge of #60601 - SimonSapin:cast, r=Kimundi
Centril a74313b
Rollup merge of #60638 - RalfJung:pin, r=sanxiyn
Centril 26a7544
Rollup merge of #60647 - petrochenkov:nospace, r=michaelwoerister
Centril 671dd09
Rollup merge of #60656 - petertodd:2019-inline-cursor-over-slice, r=s…
Centril e40f9a6
Rollup merge of #60657 - JohnTitor:stabilize-array, r=SimonSapin
Centril e57c7b8
Add regression test for #60674.
davidtwco df41e4f
Remove the old await! macro
cramertj dcd3cf7
Do not modify mutability of simple bindings.
davidtwco d5e0406
Add FIXME about `construct_async_arguments`.
davidtwco 1fe3ce1
Omit the vendor component in the WASI triple
sunfishcode a784a80
Auto merge of #60672 - Centril:rollup-fhcx463, r=Centril
bors adcd4aa
Auto merge of #60665 - pietroalbini:upgrade-ci-images, r=alexcrichton
bors 62ab971
Rollup merge of #59348 - matthewjasper:cleanup-drop-shims, r=arielb1
Centril 39edc68
Rollup merge of #60188 - estebank:recover-block, r=varkor
Centril bd17b5c
Rollup merge of #60234 - tesaguri:cursor-default, r=Amanieu
Centril 903fc4b
Rollup merge of #60618 - mark-i-m:transcribe, r=petrochenkov
Centril e7b4023
Rollup merge of #60648 - petrochenkov:shorten2, r=Dylan-DPC
Centril f27f14b
Rollup merge of #60671 - euclio:extern-crate, r=Centril
Centril f6df1f6
Rollup merge of #60675 - cramertj:no-await-macro, r=nikomatsakis,Centril
Centril 45b0945
Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj
Centril adb998f
Fix cfg(test) build on SGX
03bd2f6
Auto merge of #60683 - Centril:rollup-p05qh5d, r=Centril
bors 407536e
Auto merge of #60451 - rasendubi:binaryheap-min-heap, r=scottmcm
bors 8c465b4
Add `InternedString::with2`.
nnethercote c2cae7b
Avoid recursion in de-gensym functions.
nnethercote 0e27c36
Add various comments.
nnethercote cb7eacb
Remove the `From<InternedString> for String` impl.
nnethercote e53bb1a
Reduce `Symbol`'s interface slightly.
nnethercote c441b8a
Auto merge of #60585 - sunfishcode:wasm32-wasi, r=alexcrichton
bors d28b7af
Extend existing test for nested mut patterns.
davidtwco 0ac53da
Auto merge of #60684 - jethrogb:jb/sgx-test, r=joshtriplett
bors c81780b
add regression test for #60629
hellow554 aeee1fb
syntax_pos: Optimize symbol interner pre-filling slightly
petrochenkov f74debb
Make tests compatible with musl host
mati865 0caa251
Conditionally provide cc in musl-toolchain.sh
mati865 8fbe1ed
Update mailmap for mati865
mati865 5b6bda3
turn a couple of fixmes into span_bugs
mark-i-m cff1bdb
Auto merge of #60588 - cuviper:be-simd-swap, r=alexcrichton
bors 0db087e
Add uninhabitedness tests w/ `#[non_exhaustive]`.
davidtwco 0d034a2
Fix inhabitedness of non-exhaustive variants.
davidtwco 8838b91
Fix uninhabitedness of non-exhaustive enums.
davidtwco 214f977
Move uninhabited tests into subdirectory.
davidtwco 1f0fb03
Add a bunch more tests.
davidtwco 5cccda1
Remove hir::ExprKind::If and replace it with lowering to hir::ExprKin…
Centril 9903968
Adjust mir-opt tests for new HIR without If
Centril 8d1e5b8
Various test changes
Centril efd3733
add test checking that 'if cond { .. }' where 'cond: &mut? bool' isn'…
Centril f9cc5a6
check_match: add FIXME for removing of hack.
Centril d94cb9f
Rollup merge of #60529 - davidtwco:rfc-2008-uninhabited, r=petrochenkov
Centril 20dff29
Rollup merge of #60620 - mark-i-m:transcribe-2, r=petrochenkov
Centril bc8c782
Rollup merge of #60659 - nnethercote:tweak-Symbol-and-InternedString,…
Centril ec6afb1
Rollup merge of #60692 - davidtwco:pr-60676-followup, r=Centril
Centril 0b63f55
Rollup merge of #60697 - hellow554:fix_60629, r=michaelwoerister
Centril 329275a
Rollup merge of #60701 - mati865:mailmap, r=Mark-Simulacrum
Centril 385d012
Make const parent errors delay_span_bugs
varkor 5310801
Add a test for invalid const arguments
varkor 0f792ab
Add a test for failed inference of const types
varkor d595b11
Auto merge of #60708 - Centril:rollup-j5smdo0, r=Centril
bors 26afc4f
Allow fallible `lift_to_global` in existential type writeback
varkor aa9369c
Add test
varkor acc7e65
Auto merge of #59288 - Centril:hir-if-to-match, r=oli-obk
bors 0686daa
Unwrap singleton block expressions in const arguments
varkor b3207d5
Add test for const impl
varkor c158a0f
Remove unnecessary unwraps
estebank 0545375
Add examples of ordered retain
cuviper adc18eb
Avoid ICE by using delay_span_bug
estebank 7519eac
Auto merge of #60721 - estebank:ice-ice-baby, r=varkor
bors b8e0d0a
Auto merge of #60700 - petrochenkov:preintern, r=nnethercote
bors 740a8da
add comment to `Rc`/`Arc`'s `Eq` specialization
chpio af39a1f
Auto merge of #60717 - varkor:impl-const-generic, r=matthewjasper
bors 28b125b
Turn `ast::Lit` into a struct
petrochenkov f2834a4
Keep the original token in `ast::Lit`
petrochenkov 751ae5a
Introduce `hir::Lit` not keeping the original token
petrochenkov a5b3f33
Eliminate `comments::Literal`
petrochenkov 8739668
Simplify conversions between tokens and semantic literals
petrochenkov 5f1924c
Auto merge of #60714 - varkor:existential-global-lift-ice, r=oli-obk
bors 3f064ca
Move literal parsing code into a separate file
petrochenkov 362431b
Cleanup the .await HIR lowering with .stmt(..).
Centril 83ed781
Address comments + Fix tests
petrochenkov d177135
Update clippy
Manishearth 3103fb2
Auto merge of #60739 - Manishearth:clippyup, r=Manishearth
bors a145b14
Remove redundant "let mut" in write_graph_label
shiatsumat 5ccf2fb
Add #[doc(hidden)] attribute on compiler generated proc-macro module.
iliekturtles af98304
Auto merge of #60318 - jethrogb:jb/try-from-slice-to-infallible, r=sf…
bors 5da009e
Rollup merge of #60720 - estebank:no-ice-thanks, r=zackmdavis
Centril e19ad45
Rollup merge of #60727 - chpio:master, r=sfackler
Centril 5490cc1
Rollup merge of #60733 - Centril:cleanup-lowering-await, r=varkor
Centril f2dd97c
Rollup merge of #60741 - shiatsumat:patch-let-mut-write-graph-label, …
Centril d28e948
Auto merge of #60748 - Centril:rollup-rr63jqo, r=Centril
bors 3b78a47
Fix HIR printing of existential type #60662
Pulkit07 14b3538
syntax: Remove some legacy nonterminal tokens
petrochenkov 0535e42
ast_validation: comments -> doc comments
Centril 9b4a630
syntax::parse::parser: convert unnecessary '&mut self's to '&self'.
Centril b680b66
parse_bottom_expr: extract common 'return' out.
Centril 4aa4a8f
Minor cleanup in parse_assoc_expr_with.
Centril 0fc2cfb
Fix minor typos for ItemLocalId
shiatsumat 16e356e
Auto merge of #60396 - cuviper:ordered-retain, r=scottmcm
bors efa3c27
Auto merge of #60474 - mati865:musl_toolchain, r=alexcrichton
bors 0df1e57
Auto merge of #60244 - SimonSapin:dangling, r=oli-obk
bors 664c8ed
Always use the stronger outlives version for opaque types
matthewjasper 1f5145e
Treat generators the same as closure for escaping lifetimes
matthewjasper 1764b29
Auto merge of #60679 - petrochenkov:lit2, r=matklad
bors 9a4f0ab
Don't allow any ReScope in impl trait types
matthewjasper 8327517
Rollup merge of #60694 - Pulkit07:issue60662, r=alexreg
Centril d11b6be
Rollup merge of #60750 - petrochenkov:noquotok2, r=Mark-Simulacrum
Centril c0aeaa1
Rollup merge of #60751 - Centril:general-cleanup, r=petrochenkov
Centril b381e52
Rollup merge of #60752 - shiatsumat:minor-typos-hir, r=wesleywiser
Centril 4443957
Auto merge of #60767 - Centril:rollup-4cbsb73, r=Centril
bors a8245f5
Add lots of static `Symbols`.
nnethercote 79602c8
Rename `syntax::symbol::symbols` as `syntax::symbol::sym`.
nnethercote fb084a4
Pass a `Symbol` to `check_name`, `emit_feature_err`, and related func…
nnethercote 999c1fc
Remove the equality operation between `Symbol` and strings.
nnethercote ea9fac5
Return a `Symbol` from `name_or_empty` functions.
nnethercote fe5f42c
Auto merge of #60630 - nnethercote:use-Symbol-more, r=petrochenkov
bors 69ef8fb
Auto merge of #60765 - matthewjasper:fix-more-escaping-rescopes, r=ol…
bors a9ec99f
Auto merge of #60649 - Xanewok:save-analysis-assoc-const-ice, r=oli-obk
bors ea956e3
add impl_trait_in_bindings to INCOMPLETE_FEATURES
Pulkit07 2821329
Rollup merge of #60176 - matthewjasper:yield-ref-to-local, r=pnkfelix
Centril c8ef512
Rollup merge of #60201 - RalfJung:core-tests, r=alexcrichton
Centril e952b52
Rollup merge of #60562 - iliekturtles:proc-macro-missing-docs, r=alex…
Centril 25b5d30
Rollup merge of #60710 - varkor:delay_span_bug-const-parent, r=matthe…
Centril b698609
Rollup merge of #60770 - Pulkit07:issue60764, r=Centril
Centril 80e7cde
Auto merge of #60794 - Centril:rollup-vlguvns, r=Centril
bors 02a148d
wip nth_back on chunks
aff83c8
hopefully working nth_back on chunks
16223e4
new implementation for nth_back for chunks
wizAmit fd15405
fixed merge conflicts
wizAmit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
wip nth_back on chunks
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
- Loading branch information
commit 02a148dba261439626c5020a7cbb15e690521e87
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion does not currently pass as of 1.36.0-nightly (a340455 2019-05-03). Is there an intentional behavior change in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not mean to intentionally change behavior with this PR. However, I would try to understand why this should be happening and update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c2.nth_back(1).unwrap()
should return&[0, 1, 2]
here, right? Since that's the first of two chunks, so the second chunk from the back.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the documentation for Chunks: https://github.com/rust-lang/rust/blob/master/src/libcore/slice/mod.rs#L4052-L4056, chunks are non-overlapping, and thereby a chunk of chunk_size 3, should have [ {2,3,4}, {0,1} ] as the slices, for nth_back. Do let me know if I misunderstood anything.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nth_back
is just a method onDoubleEndedIterator
, it doesn't actually change the items.[0, 1, 2, 3, 4].chunks(3)
returns an iterator over the items&[0, 1, 2]
and&[3, 4]
, in that order, so calling.nth_back(1)
on it should return&[0, 1, 2]
.Note that your description matches the behavior of
rchunks
, which does have its first chunk at the end of the slice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @timvermeulen I have changed the implementation and pushed the changes... please do let me know if you have any more review comments or any regression fails..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like something went wrong, the diff is huge now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya this happened i believe because of rebasing to changes in master... shall i post the patch for the changes??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really an expert when it comes to git, sorry.
As for your changes to
nth
– I think it's a lot more complicated than necessary. For starters, you don't needchecked_rem
becauseself.chunk_size
is guaranteed to be non-zero, and you could replace your usage ofchecked_sub
withsaturating_sub
.For inspiration, you could have a looks at my
RChunks::nth
implementation here, which should probably be pretty similar.