conradkleinespel / rpassword

Cross platform Rust library to read a password in the terminal (Linux, BSD, OSX, Windows, WASM).
Apache License 2.0
244 stars 38 forks source link

Allow an optional BufReader to be passed in for basic mocking. #20

Closed DaveLancaster closed 6 years ago

DaveLancaster commented 6 years ago

If this PR is merged rpassword will:

The purpose of these changes are to allow for library authors to have the option to directly call the new function with a Cursor or similar to easily mock out STDIN and prevent tests hanging waiting for input.

conradkleinespel commented 6 years ago

@DaveLancaster Looks good ! Thanks a lot for your help ! 👍 ❤️

conradkleinespel commented 6 years ago

@DaveLancaster Just published 2.0.0 on crates.io. Have fun ! :)