rust/library/alloc/tests
The8472 3f9b26dc64 Fix Iterator::advance_by contract inconsistency
The `advance_by(n)` docs state that in the error case `Err(k)` that k is always less than n.
It also states that `advance_by(0)` may return `Err(0)` to indicate an exhausted iterator.
These statements are inconsistent.
Since only one implementation (Skip) actually made use of that I changed it to return Ok(()) in that case too.

While adding some tests I also found a bug in `Take::advance_back_by`.
2021-11-19 13:00:23 +01:00
..
arc.rs Add Weak may_dangle tests 2021-05-20 19:42:29 -07:00
binary_heap.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
borrow.rs Move various ui const tests to library 2020-09-04 02:35:27 +02:00
boxed.rs Fix grammar 2021-08-24 17:56:39 +02:00
btree_set_hash.rs Include the length in BTree hashes 2021-10-01 12:29:09 -07:00
const_fns.rs BTree: remove Ord bound from new 2021-08-18 03:55:36 +01:00
cow_str.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fmt.rs Auto merge of #78618 - workingjubilee:ieee754-fmt, r=m-ou-se 2021-03-27 10:40:16 +00:00
heap.rs Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
lib.rs Make slice->str conversion and related functions const 2021-11-18 00:50:42 +03:00
linked_list.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
rc.rs Add Weak may_dangle tests 2021-05-20 19:42:29 -07:00
slice.rs Improve wording, correct -> tight. 2021-08-13 15:27:30 +02:00
str.rs Make slice->str conversion and related functions const 2021-11-18 00:50:42 +03:00
string.rs Use assert_matches! instead of if let {} else 2021-08-07 14:48:27 +01:00
vec_deque.rs Use assert_matches! instead of if let {} else 2021-08-07 14:48:27 +01:00
vec.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00