1
Fork 0

Remove checked arithmetic from if expression hash tests

This commit is contained in:
Jeff Crocker 2017-11-14 12:12:04 -08:00
parent 642468858f
commit d1a83c6bd2
No known key found for this signature in database
GPG key ID: 05997DB09D30BCD6

View file

@ -104,7 +104,7 @@ pub fn add_else_branch(x: bool) -> u32 {
let mut ret = 1; let mut ret = 1;
if x { if x {
ret += 1; ret = 2;
} }
ret ret
@ -119,7 +119,7 @@ pub fn add_else_branch(x: bool) -> u32 {
let mut ret = 1; let mut ret = 1;
if x { if x {
ret += 1; ret = 2;
} else { } else {
} }
@ -209,7 +209,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
let mut ret = 1; let mut ret = 1;
if let Some(x) = x { if let Some(x) = x {
ret += x; ret = x;
} }
ret ret
@ -224,7 +224,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
let mut ret = 1; let mut ret = 1;
if let Some(x) = x { if let Some(x) = x {
ret += x; ret = x;
} else { } else {
} }