Open wiiznokes opened 7 months ago
I want to use this crate to normalize a search, so i have concern about the performance of .collect::<String>.
.collect::<String>
Is there a way to reuse the previous value, when possible ?
When i try .collect::<Cow<str>>, i always see Owned("...") in the debugger.
.collect::<Cow<str>>
Owned("...")
.collect() is a trait method so I don't think it can be optimized that way, but I'm open to there being other APIs for it if it doesn't end up being too complicated
.collect()
I want to use this crate to normalize a search, so i have concern about the performance of
.collect::<String>
.Is there a way to reuse the previous value, when possible ?
When i try
.collect::<Cow<str>>
, i always seeOwned("...")
in the debugger.