Write a conservative .mailmap as an example for contributors to write
their preferred names/ email addresses to. This patch makes no
assumptions about the same author using different email addresses, and
only collects cases where the full-name of the person is spelt
differently for the same email address. Verify with:
$ git shortlog -se | cut -f 2 | cut -d\< -f 2 | sort | uniq -d
It only assumes that the author prefers the full-name that appears
dominantly, by number of contributions.
For the purposes of merging, a strictly alphabetical ordering is
advised. See MAPPING AUTHORS section of git-shortlog(1) to understand
the format of this file.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
As the title suggests, this marks all the fns on the impls on the atomic types in std::unstable::atomics as pub, which makes them significantly more usable (they are rather unusable otherwise).
r?
Closes#6607
I went with `RawPtr` instead of `UnsafePtr` because not all of these operations are `unsafe`, so to me it makes more sense to refer to it as a "raw" (not wrapped/abstracted) pointer. If we decide on something else in #6608 it can be renamed again.
For types that are passed by value, we can't just cast the value to a
pointer, but have to use an alloca and copy the value there. This
handling is already present for all other arguments, but was missing
for "self".
Fixes#6682#4850#4878
For types that are passed by value, we can't just cast the value to a
pointer, but have to use an alloca and copy the value there. This
handling is already present for all other arguments, but was missing
for "self".
Fixes#6682, #4850 and #4878
`std::hashmap::HashMap.insert_or_update_with()` is basically the opposite
of `find_or_insert_with()`. It inserts a given key-value pair if the key
does not already exist, or replaces the existing value with the output
of the passed function if it does.
This is useful because replicating this with existing functionality is awkward, especially with the current borrow-checker. In my own project I have code that looks like
if match map.find_mut(&key) {
None => { true }
Some(x) => { *x += 1; false }
} {
map.insert(key, 0);
}
and it took several iterations to make it look this good. The new function turns this into
map.insert_or_update_with(key, 0, |_,x| *x += 1);