1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

chore: update derive_more to v2

This commit is contained in:
Rob Ede
2025-02-24 04:03:40 +00:00
parent a6df6cc903
commit df0dc549a5
15 changed files with 62 additions and 41 deletions

View File

@ -13,7 +13,7 @@ http errors will be chosen, each with an equal chance of being selected:
*/
use actix_web::{web, App, Error, HttpResponse, HttpServer, ResponseError};
use derive_more::Display; // naming it clearly for illustration purposes
use derive_more::Display;
use rand::{
distr::{Distribution, StandardUniform},
Rng,
@ -21,13 +21,13 @@ use rand::{
#[derive(Debug, Display)]
pub enum CustomError {
#[display(fmt = "Custom Error 1")]
#[display("Custom Error 1")]
CustomOne,
#[display(fmt = "Custom Error 2")]
#[display("Custom Error 2")]
CustomTwo,
#[display(fmt = "Custom Error 3")]
#[display("Custom Error 3")]
CustomThree,
#[display(fmt = "Custom Error 4")]
#[display("Custom Error 4")]
CustomFour,
}