Fix example for BufferedReader

Fixes #18197
auto merge of #18374 : steveklabnik/rust/gh18197, r=sfackler

Fixes #18197