rust-nostr/nostr

Tag Rewrite Migration

xeruf opened this issue · 1 comments

e9c90fc removed GenericTagValue and added an Arc to the content

  • Is there any replacement for the GenericTagValue?
  • Why does the Tag struct contain the complicated standardized: Arc<OnceCell<Option<TagStandard>>> instead of simply an Option or a Lazy, or not simply a function to get the standardized value without internal caching? Seems like odd premature optimization that might not actually optimize anything.

Is there any replacement for the GenericTagValue?

No, as another dev pointed out, the content of a tag depends by the tag kind. The GenericTagValue was just parsing the content without taking care of the kind of tag (which caused some issue is some cases).

Why does the Tag struct contain the complicated standardized: Arc<OnceCell<Option>>

Thanks, my bad, the Arc<T> is not necessary there. I'm going to remove it.