1
0
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:
Christopher Gubbin
2022-02-02 01:47:07 +00:00
committed by GitHub
parent ce014059e6
commit e1dfa6840f
2 changed files with 4 additions and 4 deletions

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,