Skip to content

Conversation

MggMuggins
Copy link
Contributor

Fixes #1171

Happy to put together an automated test for this but I thought I'd start with an implementation.

This avoids a move of `self`.

Signed-off-by: Wesley Hershberger <[email protected]>
let mut input = self.source_timeout(timeout);
let _hide_input = HiddenInput::new(false)?;
read_unbuffered(&mut input)
let rslt = read_unbuffered(&mut input);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use ret as variable name?

Comment on lines +287 to +288
let rslt = if let Some(hide_input) = HiddenInput::new(true)? {
match self {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can stay a single match, right? So let ret = match (HiddenInput::new(true)?, self) { ... };

@bjorn3
Copy link
Collaborator

bjorn3 commented Oct 13, 2025

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aesthetics in passwd_timeout + PAM modules that talk to the user.

2 participants