mirror of
https://github.com/actix/examples
synced 2025-06-28 18:00:37 +02:00
Updated basics/error-handling to v4. (#476)
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
committed by
GitHub
parent
ce014059e6
commit
e1dfa6840f
@ -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,
|
||||
|
Reference in New Issue
Block a user