2 ms·
Certainly I find if (key_data_.has_value() && !key_data_->label().empty()) return key_data_->label(); to be less readable than: if let Some(label) =
by tialaramex 5y ago
Certainly I find
if (key_data_.has_value() && !key_data_->label().empty())
return key_data_->label();
to be less readable than:
if let Some(label) = key_data_ {
label
}
It's notable that people complain Rust adds too many odd punctuation marks, and yet in this example it's C++ with an exclamation mark, question marks, and two different structure member operators (dot and arrow) while Rust just does the pattern match.