Do I need to use lazy_static for initializing static String?
Yes. String
is allocated on the heap, and you can't statically heap-allocate things.
That said, maybe Cow
<'static, str>
will of interest.
Thank you!
I will study Cow.
Do I need to use lazy_static for initializing static String?
Yes. String
is allocated on the heap, and you can't statically heap-allocate things.
That said, maybe Cow
<'static, str>
will of interest.
Thank you!
I will study Cow.