Releases: conradkleinespel/rpassword
v7.4.0
Changes and updates in this release:
- Updates
windows-sysfrom0.52to0.59, see cb2244a; - Improves Chinese character handling, the commit is in the
rtoolboxcrate, for which the change is visible in conradkleinespel/duck@55eaf6a. Thank you @Jordan-Haidee for providing a fix in #97.
I've noticed after publishing the release that the size of the crate on crates.io went from 7KiB to 121KiB. That's due to the addition of an image in the README.md, which I did not anticipate would be distributed to everyone. The fix (7c30111) will be included in the next release.
No functionality changes in this release. It is backwards compatible.
v7.3.1
This release updates the README.md, so the latest version appears on crates.io.
No functionality changes in this release. It is backwards compatible.
v7.3.0
v7.2.0
This release completely removes the dependency on serde. It adds a new dependency rtoolbox which are utility functions I use in multiple projects. This change is meant to improve supply chain security. I don't own serde but I do own rtoolbox. Code for rtoolbox is available in the mono-repo.
No functionality changes in this release. It is backwards compatible.
v7.1.0
This release includes a fix from @LSchallot which allows users to hit Ctrl-U to remove the password and start from scratch, similar to when you hit Ctrl-U in your terminal to clear the line.
It also specifies a minimum Rust version in Cargo.toml.
v7.0.0
This release contains a potentially breaking change in that it removes the dependency on serde. But in most cases you should not need to change any of your code. Thanks @BlackHoleFox for the help.
Thanks also @NovaliX-Dev for fixing a bug on Windows, see 3858917.
You will need at least Rust 1.60 to use this new release.
v6.0.1
No code changes. Updated docs so they display correctly on sites such as https://docs.rs/rpassword and https://crates.io/crates/rpassword.
v6.0.0
This release contains breaking changes.
Notable changes:
- API changes to be more flexible and more generic;
- move to Rust 2018 edition;
- WASM/WASI support, thanks @john-sharratt.
The API has changed from:
pub fn read_password() -> Result<String>
pub fn read_password_from_tty(prompt: Option<&str>) -> ::std::io::Result<String>
pub fn read_password_with_reader<T: BufRead>(source: Option<&mut T>) -> Result<String>
pub fn prompt_password_stdout(prompt: &str) -> std::io::Result<String>
pub fn prompt_password_stderr(prompt: &str) -> std::io::Result<String>
To:
pub fn read_password_from_bufread(reader: &mut impl BufRead) -> std::io::Result<String>
pub fn read_password() -> std::io::Result<String>
pub fn prompt_password_from_bufread(reader: &mut impl BufRead, writer: &mut impl Write, prompt: impl ToString) -> std::io::Result<String>
pub fn prompt_password(prompt: impl ToString) -> std::io::Result<String>
By default, reading and writing is done from/to the TTY instead of stdin/stdout. This is more reliable for most cases. If you need to read or write from/to a different place, the function versions with from_bufread allow you to pass anything you'd like.
v5.0.1
v5.0.0
There is 1 breaking change in this release.
If you use the read_password_with_reader function, you will need to replace any calls to read_password_with_reader(Some(reader)) with read_password_with_reader(Some(&mut reader)). This change allows calling read_password_with_reader multiple times with the same reader, which makes unit testing much easier (see #46 for some background).
Thanks @dvermd for this contribution!