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

Change positioning of timer::pause in human checker fixing bug where API would panic no matter what #126

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/checkers/human_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use text_io::read;
/// TODO: Add a way to specify a list of checkers to use in the library. This checker is not library friendly!
// compile this if we are not running tests
pub fn human_checker(input: &CheckResult) -> bool {
timer::pause();
// wait instead of get so it waits for config being set
let config = get_config();
// We still call human checker, just if config is false we return True
if !config.human_checker_on {
return true;
}

timer::pause();
let output_string = format!(
"I think the plaintext is a {}.\nPossible plaintext: '{}' (y/N): ",
input.description, input.text
Expand Down