mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
Updated basics/error-handling to v4. (#476)
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
parent
ce014059e6
commit
e1dfa6840f
@ -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"
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user