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

Oh no! #11

Closed jonas-schievink closed 8 years ago

jonas-schievink commented 8 years ago

When aborting password entry with Ctrl+D (on Linux, but I'd imagine it's the same on OS X), read_password returns an error that reads "oh no!". It should probably return a more descriptive error.

conradkleinespel commented 8 years ago

@jonas-schievink Hello ! Thanks for the suggestion. You are 100% right. What would be a good, descriptive, error message for Ctrl+D ? This basically happens anytime there is not enough input, so maybe UnexpectedEof would be OK ?

jonas-schievink commented 8 years ago

Yes, that sounds good!

conradkleinespel commented 8 years ago

@jonas-schievink Awesome, thanks again ! Just pushed a commit that fixes that. I've bumped the minor version number as this is a breaking change.