Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
fix cast to u8 for score
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed May 31, 2023
1 parent 420e696 commit 05c21f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/captcha/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ pub mod captcha {
summary.score = 0;
} else {
// score is between 0 - 200, i.e. 0% - 100% in 0.5% increments
summary.score = (summary.correct * 200) / (summary.correct + summary.incorrect);
summary.score = (summary.correct * 200) / (summary.correct + summary.incorrect) as u8;
}

Ok(summary)
Expand Down

0 comments on commit 05c21f5

Please sign in to comment.