Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm: refactor prompt_file() #5147

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

cakebaker
Copy link
Contributor

This PR applies two refactorings to prompt_file() to simplify the function:

  • extract a prompt_dir() function
  • replace an if with a match

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

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

One suggestion, looks good otherwise!

true
}
}

#[allow(clippy::cognitive_complexity)]
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can remove this now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, there is still a warning from the clippy::cognitive_complexity lint :|

Copy link
Member

Choose a reason for hiding this comment

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

:(

@tertsdiepraam tertsdiepraam merged commit 8f5899b into uutils:main Aug 11, 2023
45 checks passed
@cakebaker cakebaker deleted the rm_refactor_prompt_file branch August 11, 2023 08:16
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.

2 participants