An option can be converted to a bool using the following code :
match some_opt {
Some(_) => true,
None => false,
}
Is there a more concise one-liner way to do this ?
An option can be converted to a bool using the following code :
match some_opt {
Some(_) => true,
None => false,
}
Is there a more concise one-liner way to do this ?