]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #52939 - ljedrz:fix_51746, r=kennytm
authorPietro Albini <pietro@pietroalbini.org>
Wed, 1 Aug 2018 19:46:36 +0000 (21:46 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Aug 2018 19:46:36 +0000 (21:46 +0200)
Make io::Read::read_to_end consider io::Take::limit

Add a custom implementation of `io::Read::read_to_end` for `io::Take` that doesn't reserve the default 32 bytes but rather `Take::limit` if `Take::limit < 32`.

It's a conservative adjustment that preserves the default behavior for `Take::limit >= 32`.

Fixes #51746.


Trivial merge