Trait for optimized string operations
| 178 | |
| 179 | /// Trait for optimized string operations |
| 180 | pub trait StringOptimized { |
| 181 | /// Convert to an optimized Cow<str> |
| 182 | fn to_optimized_string(&self) -> Cow<'_, str>; |
| 183 | |
| 184 | /// Convert to owned string only if necessary |
| 185 | fn to_string_if_needed(&self) -> Cow<'_, str>; |
| 186 | } |
| 187 | |
| 188 | impl StringOptimized for str { |
| 189 | fn to_optimized_string(&self) -> Cow<'_, str> { |
nothing calls this directly
no outgoing calls
no test coverage detected