Skip to content

Commit

Permalink
Fixes outdated documentation in rpassword
Browse files Browse the repository at this point in the history
  • Loading branch information
conradkleinespel committed Dec 16, 2023
1 parent 0f91e86 commit 49e3f3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ pub use wasm::read_password;
#[cfg(target_family = "windows")]
pub use windows::read_password;

/// Reads a password from anything that implements BufRead
/// Reads a password from `impl BufRead`
pub fn read_password_from_bufread(reader: &mut impl BufRead) -> std::io::Result<String> {
let mut password = SafeString::new();
reader.read_line(&mut password)?;

fix_line_issues(password.into_inner())
}

/// Prompts on the TTY and then reads a password from anything that implements BufRead
/// Prompts on `impl Write` and then reads a password from `impl BufRead`
pub fn prompt_password_from_bufread(
reader: &mut impl BufRead,
writer: &mut impl Write,
Expand Down

0 comments on commit 49e3f3a

Please sign in to comment.