]> git.lizzy.rs Git - rust.git/commit
Merge #8063
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Wed, 17 Mar 2021 08:12:34 +0000 (08:12 +0000)
committerGitHub <noreply@github.com>
Wed, 17 Mar 2021 08:12:34 +0000 (08:12 +0000)
commitf7fbea509f1e5f840e715c912ee38aa997d1bfbc
tree2b4932678fc83624c278ca93cdf0f1d3a28346c2
parent6fcb5d772f16af0d1f62dad55fbde75072fb9e89
parentff5f90d8ae2da8e4856d5c78f55e5cd02b178325
Merge #8063

8063: couple clippy::complexity fixes r=matklad a=matthiaskrgr

avoid redundant `.into()` calls to convert T into identical T (`let x: String = String::from("hello").into();`)
use `if let Some(x)` instead of `.is_some()` + `.unwrap()`
don't clone Copy types
remove redundant wrapped ?s:  `Some(Some(3)?)` can just be `Some(3)`
use `.map(|x| y)` instead of `and_then(|x| Some(y)` on `Option`s

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>