Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with AsyncBufRead::read_line and AsyncBufReadExt::lines #2884

Merged
merged 3 commits into from
Sep 18, 2024

Commits on Sep 14, 2024

  1. Configuration menu
    Copy the full SHA
    9ca78eb View commit details
    Browse the repository at this point in the history
  2. Fix issues with AsyncBufRead::read_line and AsyncBufReadExt::lines`

    Fixes the following issues in `AsyncBufRead::read_line`:
    * When the future is dropped the previous string contents are not restored so the string is empty.
    * If invalid UTF-8 is encountered the previous string contents are not restored.
    * If an IO error occurs after `read_until_internal` already read a couple of bytes a debug assertion fails.
    * Performance: The whole string to which read contents are appended is check for UTF-8 validity instead of just the added bytes.
    
    * Fixes the following issues in `AsyncBufRead::read_line`
    * If an IO error occurs after `read_until_internal` already read a couple of bytes a debug assertion fails. (rust-lang#2862)
    
    Fixes rust-lang#2862.
    hkratz committed Sep 14, 2024
    Configuration menu
    Copy the full SHA
    f7d3367 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7de26da View commit details
    Browse the repository at this point in the history