1
0
mirror of https://github.com/actix/examples synced 2024-11-23 14:31:07 +01:00

Updated basics/error-handling to v4. (#476)

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
Christopher Gubbin 2022-02-02 01:47:07 +00:00 committed by GitHub
parent ce014059e6
commit e1dfa6840f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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"

View File

@ -33,7 +33,7 @@ pub enum CustomError {
impl Distribution<CustomError> for Standard {
fn sample<R: Rng + ?Sized>(&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,