We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6424688 commit d1a83c6Copy full SHA for d1a83c6
src/test/incremental/hashes/if_expressions.rs
@@ -104,7 +104,7 @@ pub fn add_else_branch(x: bool) -> u32 {
104
let mut ret = 1;
105
106
if x {
107
- ret += 1;
+ ret = 2;
108
}
109
110
ret
@@ -119,7 +119,7 @@ pub fn add_else_branch(x: bool) -> u32 {
119
120
121
122
123
} else {
124
125
@@ -209,7 +209,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
209
210
211
if let Some(x) = x {
212
- ret += x;
+ ret = x;
213
214
215
@@ -224,7 +224,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
224
225
226
227
228
229
230
0 commit comments