You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AsyncReadExt::read_to_string leaves buf empty if it encounters invalid UTF-8. This is inconsistent with the behavior of std::io::Read::read_to_string, which will truncate it to original length (i.e. leave it unchanged).
Relatedly, the performance of this method could be improved. Currently it validates the entire string; it is only necessary to validate the newly-read portion since the original portion is already guaranteed to be valid.