From 738c8879fd0a8cfce8166a50b2fd7799f8b922ef Mon Sep 17 00:00:00 2001 From: yuriynex Date: Sun, 4 May 2025 19:19:13 -0700 Subject: [PATCH] style: remove extra blank lines in do_something_random function --- basics/error-handling/src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/basics/error-handling/src/main.rs b/basics/error-handling/src/main.rs index 2a0a43dc..9a038a37 100644 --- a/basics/error-handling/src/main.rs +++ b/basics/error-handling/src/main.rs @@ -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(())