Auto merge of #46980 - zackmdavis:and_the_case_of_the_needlessly_parenthesized_arguments, r=petrochenkov

in which the unused-parens lint comes to cover function and method args

Resolves #46137.
This commit is contained in:
bors
2018-01-20 15:06:41 +00:00
7 changed files with 25 additions and 11 deletions

View File

@@ -2480,7 +2480,7 @@ impl<T> From<VecDeque<T>> for Vec<T> {
if other.is_contiguous() {
ptr::copy(buf.offset(tail as isize), buf, len);
} else {
if (tail - head) >= cmp::min((cap - tail), head) {
if (tail - head) >= cmp::min(cap - tail, head) {
// There is enough free space in the centre for the shortest block so we can
// do this in at most three copy moves.
if (cap - tail) > head {