1
0
mirror of https://github.com/actix/examples synced 2025-05-07 22:34:05 +02:00

style: remove extra blank lines in do_something_random function

This commit is contained in:
yuriynex 2025-05-04 19:19:13 -07:00
parent 3fbe782be8
commit 738c8879fd

View File

@ -87,10 +87,8 @@ impl ResponseError for CustomError {
/// randomly returns either () or one of the 4 CustomError variants
async fn do_something_random() -> Result<(), CustomError> {
let mut rng = rand::rng();
// 20% chance of success
const SUCCESS_PROBABILITY: f64 = 0.2;
if rng.random_bool(SUCCESS_PROBABILITY) {
log::info!("Random operation succeeded");
Ok(())