Static String initialization


#1

Do I need to use lazy_static for initializing static String?


#2

Yes. String is allocated on the heap, and you can’t statically heap-allocate things.

That said, maybe Cow<'static, str> will of interest.


#3

Thank you!
I will study Cow.