I have come across use cases where it would be nice to use a Cow<str> or just a &'static str to avoid unnecessary memory allocations.
I believe it would be beneficial to make these type generic of the string type.
e.g.
struct Text<S: AsRef<str>> {
content: S,
..
}
Any thoughts?
I'd be willing to make a PR for this if people are willing to accept this change :smile:
Currently
Text
/TextInput
are defined as follows:I have come across use cases where it would be nice to use a
Cow<str>
or just a&'static str
to avoid unnecessary memory allocations. I believe it would be beneficial to make these type generic of the string type.e.g.
Any thoughts? I'd be willing to make a PR for this if people are willing to accept this change :smile: