rust/src/liballoc/tests
Mark Simulacrum 5f732eba7a Rollup merge of #43041 - andersk:dedup_by, r=alexcrichton
Document unintuitive argument order for Vec::dedup_by relation

When trying to use `dedup_by` to merge some auxiliary information from removed elements into kept elements, I was surprised to observe that `vec.dedup_by(same_bucket)` calls `same_bucket(a, b)` where `b` appears before `a` in the vector, and discards `a` when true is returned.  This argument order is probably a bug, but since it has already been stabilized, I guess we should document it as a feature and move on.

(`Vec::dedup` also uses `==` with this unexpected argument order, but I figure that’s not important since `==` is expected to be symmetric with no side effects.)
2017-07-04 07:41:42 -06:00
..
btree Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
binary_heap.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
cow_str.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
fmt.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
lib.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
linked_list.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
slice.rs Improve sort tests and benchmarks 2017-06-24 17:14:42 +02:00
str.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
string.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
vec.rs Document unintuitive argument order for Vec::dedup_by relation 2017-07-03 18:38:53 -04:00
vec_deque.rs Delete deprecated & unstable range-specific step_by 2017-07-01 19:18:02 -07:00