Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
squell committed Jan 7, 2025
1 parent 23d464c commit 626721b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pam/rpassword.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ fn read_unbuffered(source: &mut dyn io::Read) -> io::Result<PamBuffer> {
fn erase_feedback(sink: &mut dyn io::Write, i: usize) {
const BACKSPACE: u8 = 0x08;
for _ in 0..i {
let _ = sink.write(&[BACKSPACE, b' ', BACKSPACE]);
if sink.write(&[BACKSPACE, b' ', BACKSPACE]).is_err() {
return;
}
}
}

Expand Down

0 comments on commit 626721b

Please sign in to comment.