| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
add a note to Vec's Extend<&T> impl about its slice specialization
From the regular documentation view, it's not at all apparent that [this specialization](https://github.com/rust-lang/rust/blob/5669c9988f50788b5ab5dee2d4538519d4e5663d/src/liballoc/vec.rs#L1879-L1891) exists for `slice::Iter`. This adds a documentation blurb to the Extend impl itself to note that this optimization exists.
|
|
|
|
|
|
|
|
|
|
Minor fix in docs for Vec
Added missing parentheses after `mem::size_of::<T>`.
|
|
|
|
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>
|
|
This reverts commit 143206d54d7558c2326212df99efc98110904fdb.
|
|
Move it and Bound to core::ops while we're at it.
Closes #30877
|
|
Replaced by adding extra imports, adding hidden code (`# ...`), modifying
examples to be runnable (sorry Homura), specifying non-Rust code, and
converting to should_panic, no_run, or compile_fail.
Remaining "```ignore"s received an explanation why they are being ignored.
|
|
|
|
|