kornel ,
@kornel@mastodon.social avatar

@became_fish Yes, because String is heap allocated by definition. It's {ptr, capacity, len}.

&str is ambivalent about the data source, and guarantees to never run any destructor or free() on the pointer.

Cow<str> holds a bool that tracks whether to free or not.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines