This seems to be a mistake since the documentation only describes its use for parsing strings.
By only accepting &str, there's no need for the to_string() call, making it more efficient. (AsRef is also an option)
Note that this would be a breaking change since it's a public API.
This seems to be a mistake since the documentation only describes its use for parsing strings. By only accepting &str, there's no need for the to_string() call, making it more efficient. (AsRef is also an option)
Note that this would be a breaking change since it's a public API.