mozilla/rust — pull request #13127 by kballard (2014-03-25 06:25:48+00:00)
Title: Add Reader.read_at_least()

Reader.read_at_least() ensures that at least a given number of bytes
have been read. The most common use-case for this is ensuring at least 1
byte has been read. If the reader returns 0 enough times in a row, a new
error kind NoProgress will be returned instead of looping infinitely.

Also add .push() and .push_at_least() companion methods.

Refs #13119.