diff --git a/basics/error_handling/Cargo.toml b/basics/error_handling/Cargo.toml index d5cd6ae2..2acf6f37 100644 --- a/basics/error_handling/Cargo.toml +++ b/basics/error_handling/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" edition = "2021" [dependencies] -actix-web = "3" +actix-web = "4.0.0-beta.21" derive_more = "0.99.2" -rand = "0.7" -env_logger = "0.8" +rand = "0.8" +env_logger = "0.9" diff --git a/basics/error_handling/src/main.rs b/basics/error_handling/src/main.rs index da6ad5c3..ee16246d 100644 --- a/basics/error_handling/src/main.rs +++ b/basics/error_handling/src/main.rs @@ -33,7 +33,7 @@ pub enum CustomError { impl Distribution for Standard { fn sample(&self, rng: &mut R) -> CustomError { - match rng.gen_range(0, 4) { + match rng.gen_range(0..4) { 0 => CustomError::CustomOne, 1 => CustomError::CustomTwo, 2 => CustomError::CustomThree,