]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/redundant_clone.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / tools / clippy / tests / ui / redundant_clone.rs
index acb7ffb305f2a8890b981bfed1c4f5303d8da232..b57027456e094fcdf95584cef10c1e3eca75f6e2 100644 (file)
@@ -1,6 +1,7 @@
 // run-rustfix
 // rustfix-only-machine-applicable
 
+#![allow(clippy::implicit_clone)]
 use std::ffi::OsString;
 use std::path::Path;
 
@@ -58,11 +59,7 @@ fn main() {
 #[derive(Clone)]
 struct Alpha;
 fn with_branch(a: Alpha, b: bool) -> (Alpha, Alpha) {
-    if b {
-        (a.clone(), a.clone())
-    } else {
-        (Alpha, a)
-    }
+    if b { (a.clone(), a.clone()) } else { (Alpha, a) }
 }
 
 fn cannot_double_move(a: Alpha) -> (Alpha, Alpha) {