Open rogarb opened 2 years ago
I think the problem is that vcard.name()
is implemented by make_getter_function_for_optional!
but it should be implemented by make_getter_function_for_values!
instead. If you read these macros you can see that you might be able to get all N
values with something like vcard.get_all("N")
.
Parsing a string containing two name fields ("N:") doesn't produce an error but silently ignores the name fields and produces a VCard with
name()
returningNone
:When executed, the code above panics due to the assertion:
A pretty print shows that both "N:" fields are effectively parsed and added to the underlying Component:
Shouldn't either the parser return a parsing error or name() return Some(Name)?