]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #69713 - matthiaskrgr:more_cleanup, r=cramertj
authorDylan DPC <dylan.dpc@gmail.com>
Thu, 5 Mar 2020 21:04:05 +0000 (22:04 +0100)
committerGitHub <noreply@github.com>
Thu, 5 Mar 2020 21:04:05 +0000 (22:04 +0100)
commit22a743bc1c242b539cd70116068e62b1bd686a10
tree50e7c4bc9bd8192437d49371a4dfc5530bbf00eb
parent189626672d4a8a838643ed612e568403aec27701
parent80ed505c41319f2fbbc7e97189e62b38c47b5a70
Rollup merge of #69713 - matthiaskrgr:more_cleanup, r=cramertj

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.
src/librustc_typeck/check/method/probe.rs