os-rust/library/alloc/tests
nils 0883848882
Rollup merge of #92284 - the8472:simplify-advance-by, r=scottmcm
Change advance(_back)_by to return the remainder instead of the number of processed elements

When advance_by can't advance the iterator by the number of requested elements it now returns the amount by which it couldn't be advanced instead of the amount by which it did.

This simplifies adapters like chain, flatten or cycle because the remainder doesn't have to be calculated as the difference between requested steps and completed steps anymore.

Additionally switching from `Result<(), usize>` to `Result<(), NonZeroUsize>` reduces the size of the result and makes converting from/to a usize representing the number of remaining steps cheap.
2023-03-28 12:51:11 +02:00
..
arc.rs Remove Vec/Rc storage reuse opt 2022-11-18 10:39:50 +00:00
autotraits.rs Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
borrow.rs Move various ui const tests to library 2020-09-04 02:35:27 +02:00
boxed.rs Add #![deny(unsafe_op_in_unsafe_fn)] in liballoc tests 2022-11-23 08:10:17 -08:00
btree_set_hash.rs Include the length in BTree hashes 2021-10-01 12:29:09 -07:00
c_str.rs Remove use of reverted std::ffi::c_char 2022-04-27 14:01:04 -07:00
const_fns.rs impl const Default for Box<[T]> and Box<str> 2022-04-11 12:14:18 -07:00
cow_str.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fmt.rs enable fuzzy_provenance_casts lint in liballoc 2022-11-20 19:12:18 +01:00
heap.rs Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
lib.rs Rollup merge of #97506 - JohnTitor:stabilize-nonnull-slice-from-raw-parts, r=m-ou-se,the8472 2023-03-27 08:46:50 +02:00
linked_list.rs Classify BinaryHeap & LinkedList unit tests as such 2022-03-11 11:33:59 +01:00
rc.rs Remove Vec/Rc storage reuse opt 2022-11-18 10:39:50 +00:00
slice.rs Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
str.rs Rollup merge of #100311 - xfix:lines-fix-handling-of-bare-cr, r=ChrisDenton 2023-03-23 00:00:30 +05:30
string.rs Adjust tests for isize::MAX allocation always being checked 2022-03-25 00:57:05 -05:00
thin_box.rs Make use of pointer::is_aligned[_to] 2022-08-21 15:46:03 +04:00
vec.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
vec_deque.rs fix advance_by impl for vec_deque and add tests 2023-03-27 16:03:30 +02:00