Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust How to use if let statement with conditions?

if b.is_some() || c == d {
    // do something
} else {
    // do something else
}


if matches!(b, Some(_)) || c == d {
    // do something
} else {
    // do something else
}
 
PREVIOUS NEXT
Tagged: #rust #How #statement
ADD COMMENT
Topic
Name
7+3 =