You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bruceg, please let us know if there are any documentation improvements needed in the format::Item and format::StrftimeItems API
This feedback seems useful to open an issue for #852 (comment):
A good example of how it can be used would be useful for documentation, ie feeding it in to format_with_items or what have you.
A bigger issue we had with this type was ownership. When parsing a string, we get items that reference the same lifetime as the string. When we later want to collect those items into a vec and store it for repeated use, we had to convert those into Item<'static> by boxing all the Literals and Spaces into OwnedLiteral and OwnedSpace. A better interface, that mimics other Rust types, might be to drop the owned variants from Item, but have a fn to_owned(&self) -> OwnedItem which has all boxed variants. I haven't looked at the underlying code to see if this makes sense for all your uses, though.
The text was updated successfully, but these errors were encountered:
From #852 (review):
This feedback seems useful to open an issue for #852 (comment):
The text was updated successfully, but these errors were encountered: