fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: redundant clone 2 --> $DIR/redundant_clone.rs:15:42 3 | 4LL | let _s = ["lorem", "ipsum"].join(" ").to_string(); 5 | ^^^^^^^^^^^^ help: remove this 6 | 7note: this value is dropped without further use 8 --> $DIR/redundant_clone.rs:15:14 9 | 10LL | let _s = ["lorem", "ipsum"].join(" ").to_string(); 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 = note: `-D clippy::redundant-clone` implied by `-D warnings` 13 = help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]` 14 15error: redundant clone 16 --> $DIR/redundant_clone.rs:18:15 17 | 18LL | let _s = s.clone(); 19 | ^^^^^^^^ help: remove this 20 | 21note: this value is dropped without further use 22 --> $DIR/redundant_clone.rs:18:14 23 | 24LL | let _s = s.clone(); 25 | ^ 26 27error: redundant clone 28 --> $DIR/redundant_clone.rs:21:15 29 | 30LL | let _s = s.to_string(); 31 | ^^^^^^^^^^^^ help: remove this 32 | 33note: this value is dropped without further use 34 --> $DIR/redundant_clone.rs:21:14 35 | 36LL | let _s = s.to_string(); 37 | ^ 38 39error: redundant clone 40 --> $DIR/redundant_clone.rs:24:15 41 | 42LL | let _s = s.to_owned(); 43 | ^^^^^^^^^^^ help: remove this 44 | 45note: this value is dropped without further use 46 --> $DIR/redundant_clone.rs:24:14 47 | 48LL | let _s = s.to_owned(); 49 | ^ 50 51error: redundant clone 52 --> $DIR/redundant_clone.rs:26:42 53 | 54LL | let _s = Path::new("/a/b/").join("c").to_owned(); 55 | ^^^^^^^^^^^ help: remove this 56 | 57note: this value is dropped without further use 58 --> $DIR/redundant_clone.rs:26:14 59 | 60LL | let _s = Path::new("/a/b/").join("c").to_owned(); 61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 62 63error: redundant clone 64 --> $DIR/redundant_clone.rs:28:42 65 | 66LL | let _s = Path::new("/a/b/").join("c").to_path_buf(); 67 | ^^^^^^^^^^^^^^ help: remove this 68 | 69note: this value is dropped without further use 70 --> $DIR/redundant_clone.rs:28:14 71 | 72LL | let _s = Path::new("/a/b/").join("c").to_path_buf(); 73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 74 75error: redundant clone 76 --> $DIR/redundant_clone.rs:30:29 77 | 78LL | let _s = OsString::new().to_owned(); 79 | ^^^^^^^^^^^ help: remove this 80 | 81note: this value is dropped without further use 82 --> $DIR/redundant_clone.rs:30:14 83 | 84LL | let _s = OsString::new().to_owned(); 85 | ^^^^^^^^^^^^^^^ 86 87error: redundant clone 88 --> $DIR/redundant_clone.rs:32:29 89 | 90LL | let _s = OsString::new().to_os_string(); 91 | ^^^^^^^^^^^^^^^ help: remove this 92 | 93note: this value is dropped without further use 94 --> $DIR/redundant_clone.rs:32:14 95 | 96LL | let _s = OsString::new().to_os_string(); 97 | ^^^^^^^^^^^^^^^ 98 99error: redundant clone 100 --> $DIR/redundant_clone.rs:43:19 101 | 102LL | let _t = tup.0.clone(); 103 | ^^^^^^^^ help: remove this 104 | 105note: this value is dropped without further use 106 --> $DIR/redundant_clone.rs:43:14 107 | 108LL | let _t = tup.0.clone(); 109 | ^^^^^ 110 111error: redundant clone 112 --> $DIR/redundant_clone.rs:75:25 113 | 114LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) } 115 | ^^^^^^^^ help: remove this 116 | 117note: this value is dropped without further use 118 --> $DIR/redundant_clone.rs:75:24 119 | 120LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) } 121 | ^ 122 123error: redundant clone 124 --> $DIR/redundant_clone.rs:132:15 125 | 126LL | let _s = s.clone(); 127 | ^^^^^^^^ help: remove this 128 | 129note: this value is dropped without further use 130 --> $DIR/redundant_clone.rs:132:14 131 | 132LL | let _s = s.clone(); 133 | ^ 134 135error: redundant clone 136 --> $DIR/redundant_clone.rs:133:15 137 | 138LL | let _t = t.clone(); 139 | ^^^^^^^^ help: remove this 140 | 141note: this value is dropped without further use 142 --> $DIR/redundant_clone.rs:133:14 143 | 144LL | let _t = t.clone(); 145 | ^ 146 147error: redundant clone 148 --> $DIR/redundant_clone.rs:143:19 149 | 150LL | let _f = f.clone(); 151 | ^^^^^^^^ help: remove this 152 | 153note: this value is dropped without further use 154 --> $DIR/redundant_clone.rs:143:18 155 | 156LL | let _f = f.clone(); 157 | ^ 158 159error: redundant clone 160 --> $DIR/redundant_clone.rs:155:14 161 | 162LL | let y = x.clone().join("matthias"); 163 | ^^^^^^^^ help: remove this 164 | 165note: cloned value is neither consumed nor mutated 166 --> $DIR/redundant_clone.rs:155:13 167 | 168LL | let y = x.clone().join("matthias"); 169 | ^^^^^^^^^ 170 171error: redundant clone 172 --> $DIR/redundant_clone.rs:209:11 173 | 174LL | foo(&x.clone(), move || { 175 | ^^^^^^^^ help: remove this 176 | 177note: this value is dropped without further use 178 --> $DIR/redundant_clone.rs:209:10 179 | 180LL | foo(&x.clone(), move || { 181 | ^ 182 183error: aborting due to 15 previous errors 184