Store path components as Cow<'de, str> instead of String
dtolnay opened this issue · comments
David Tolnay commented
This is likely to reduce overhead of using serde_path_to_error on formats that support borrowing.
David Tolnay commented
I think this is all right as is. For the most performance-sensitive use cases there is an opportunity for someone to create a differently optimized alternative to this crate, but the Cow suggestion in this issue is most likely not the only way these would need to differ.