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

The example in README does not work #7

Closed JanLikar closed 8 years ago

JanLikar commented 8 years ago

On my computer (Latest Ubuntu) "Type a password: " gets printed into the terminal only after entering the password. This happens because print! macro doesn't flush output buffers. There are two solutions: example could be fixed to manually flush the buffer or read_password() could be modified to implicitly flush it.

I am willing to create a pull request, if you want me to.

conradkleinespel commented 8 years ago

Hi @JanLikar,

Thanks a lot for bringing this up ! :+1:

I will correct the example. Are you OK with me adding you as a contributor ?

Best regards, Conrad

JanLikar commented 8 years ago

You're welcome. And yes, you can add me.

conradkleinespel commented 8 years ago

Awesome, thanks !