]> git.lizzy.rs Git - rust.git/commit
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)
commiteeb7b6ae093c666084bb0f35e73151dcbe7a93af
tree7fcc3c4c0f66c3d4d26965b8c7ae2f9c599213fd
parent2893bd0e0c752af8c2238bf18181a4b6991bfd78
parentb5ed39ff10f0e46be6e97b577477e0f60234fa0b
Rollup merge of #52939 - ljedrz:fix_51746, r=kennytm

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.