rust/src/liballoc
Anders Kaseorg d68c3ab17b 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.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2017-07-03 18:38:53 -04:00
..
benches Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichton 2017-07-02 23:54:32 +00:00
btree Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00
tests Document unintuitive argument order for Vec::dedup_by relation 2017-07-03 18:38:53 -04:00
allocator.rs std: Fix implementation of Alloc::alloc_one 2017-06-25 11:35:05 -07:00
arc.rs 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
borrow.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
boxed.rs Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
boxed_test.rs Direct conversions between slices and boxes. 2017-02-06 18:53:13 -05:00
Cargo.toml Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
fmt.rs Rollup merge of #42832 - rthomas:doc-fmt, r=steveklabnik 2017-06-29 08:40:03 +00:00
heap.rs Add impl of Alloc for the global rust heap. 2017-06-15 23:48:30 +02:00
lib.rs Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichton 2017-07-02 23:54:32 +00:00
linked_list.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
macros.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
oom.rs drop an unnecessary newline 2016-11-10 23:44:15 -05:00
range.rs Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00
raw_vec.rs Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
rc.rs Fix ref as mutable ref in std::rc::Rc doc 2017-06-22 15:48:20 +02:00
slice.rs Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichton 2017-07-02 23:54:32 +00:00
str.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
string.rs Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00
vec.rs Document unintuitive argument order for Vec::dedup_by relation 2017-07-03 18:38:53 -04:00
vec_deque.rs Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00