dtolnay / path-to-error

Find out path at which a deserialization error occurred

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Store path components as Cow<'de, str> instead of String

dtolnay opened this issue · comments

This is likely to reduce overhead of using serde_path_to_error on formats that support borrowing.

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.