rust if let code example
Example 1: if let some rust
let number = Some(10);
if let Some(i) = number {
println!("{}", i);
}
Example 2: if in rust
if <boolean expression> {
print!("result from expression is true");
}
else {
print!("result from expression is false");
}