Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace read_to_string -> read_to_end to improve UTF-8 deserialization
See c1692e9 There are two more instances, encountered when debugging #148 > Instead of read_to_string(), use read_to_end() to read into a buffer, > then convert using String::from_utf8() and unwrap it. This gives a > better error message when UTF-8 fails to decode. which includes the offending bytes that can't be converted
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters