Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #69746

Merged
merged 27 commits into from
Mar 6, 2020
Merged

Rollup of 8 pull requests #69746

merged 27 commits into from
Mar 6, 2020

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

GuillaumeGomez and others added 27 commits March 4, 2020 13:01
The Result can be expect-unwrapped directly. (clippy::ok_expect)
…nd anything.

For example:  `if let Some(_) = foo() {}`	can be reduced to	`if foo().is_some() {}`   (clippy::redundant_pattern_matching)
… type.

These were introduced since I last fixed most of these occurences. (clippy::clone_on_copy, clippy::single_char_pattern)
…otate it. (clippy::redundant_static_lifetimes)
…)' loops on iterators. (clippy::while_let_on_iterator)
"vector" was used instead of "string"
Use associated constants of integer types

Take advantage of rust-lang#68952 in the interpreter and some nearby modules :)
more clippy cleanups

* Don't use .ok() before unwrapping via .expect() on a Result.
* Use .map() to modify data inside Options instead of using .and_then(|x| Some(y))
* Use .as_deref() instead of .as_ref().map(Deref::deref)
* Don't use "if let" bindings to only check a value and not actually bind anything.
* Use single-char patter on {ends,starts}_with and remove clone on copy type.
… r=Dylan-DPC

Clean E0382 and E0384 explanations

r? @Dylan-DPC
…lan-DPC

even more clippy cleanups

* Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed)
* Use more efficient &&str to String conversion (clippy::inefficient_to_string)
* Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call)
* Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg)
* Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator)
* Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes)
* Remove redundant patterns when matching ( x @ _  to  x) (clippy::redundant_pattern)
…vink

Fixed a typo

"vector" was used instead of "string". I think this is a typo?
@Dylan-DPC-zz Dylan-DPC-zz added the rollup A PR which is a rollup label Mar 5, 2020
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Mar 5, 2020

📌 Commit 80c8434 has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 5, 2020
@bors
Copy link
Contributor

bors commented Mar 5, 2020

⌛ Testing commit 80c8434 with merge b818ccc...

@bors
Copy link
Contributor

bors commented Mar 6, 2020

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing b818ccc to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 6, 2020
@bors bors merged commit b818ccc into rust-lang:master Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants