From 53d827331c4bce8341c1d3b17c44589093fc8d39 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Wed, 10 Apr 2024 12:45:29 +0200 Subject: [PATCH] fix(deps): fix nutype dependency --- crates/validation/Cargo.toml | 2 +- crates/validation/src/auth.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/validation/Cargo.toml b/crates/validation/Cargo.toml index f0dfb07..3051663 100644 --- a/crates/validation/Cargo.toml +++ b/crates/validation/Cargo.toml @@ -9,4 +9,4 @@ publish = false [dependencies] serde.workspace = true -nutype = { version = "0.4", features = [ "serde" ] } +nutype = { version = "0.4.0", features = [ "serde" ] } diff --git a/crates/validation/src/auth.rs b/crates/validation/src/auth.rs index 52c733b..80644b7 100644 --- a/crates/validation/src/auth.rs +++ b/crates/validation/src/auth.rs @@ -32,10 +32,10 @@ impl_newtype!(Name, NameError); impl NewTypeError for NameError { fn to_string(&self) -> String { match self { - __nutype_private_Name__::NameError::LenCharMinViolated => { + NameError::LenCharMinViolated => { "Name must be at least 3 characters long".to_owned() } - __nutype_private_Name__::NameError::LenCharMaxViolated => { + NameError::LenCharMaxViolated => { "Name must be at most 256 characters long".to_owned() } } @@ -55,7 +55,7 @@ impl_newtype!(Email, EmailError); impl NewTypeError for EmailError { fn to_string(&self) -> String { match self { - __nutype_private_Email__::EmailError::LenCharMaxViolated => { + EmailError::LenCharMaxViolated => { "Email must be at most 256 characters long".to_owned() } } @@ -81,10 +81,10 @@ impl Debug for Password { impl NewTypeError for PasswordError { fn to_string(&self) -> String { match self { - __nutype_private_Password__::PasswordError::LenCharMinViolated => { + PasswordError::LenCharMinViolated => { "Password must be at least 8 characters long".to_owned() } - __nutype_private_Password__::PasswordError::LenCharMaxViolated => { + PasswordError::LenCharMaxViolated => { "Password must be at most 256 characters long".to_owned() } }