From e88547dd8fdb64562d2d3d8ca261aeb2abebd6b8 Mon Sep 17 00:00:00 2001 From: Frankie Foston Date: Thu, 18 Feb 2021 18:20:15 +0000 Subject: [PATCH] Release 0.2.1 --- CHANGELOG.md | 5 +++++ validatron/Cargo.toml | 2 +- validatron/src/validators.rs | 10 ++++++++-- validatron_derive/Cargo.toml | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c521951..24ce8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,11 @@ updated throughout the repository. ## [Unreleased] +## v0.2.1 + +### Changed +- Better error messages for inbuilt validators + ## v0.2.0 ### Added diff --git a/validatron/Cargo.toml b/validatron/Cargo.toml index 4cb8768..2198cf2 100644 --- a/validatron/Cargo.toml +++ b/validatron/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "validatron" -version = "0.2.0" +version = "0.2.1" authors = ["Frankie Foston "] edition = "2018" license = "MIT" diff --git a/validatron/src/validators.rs b/validatron/src/validators.rs index 14daf60..6abcc44 100644 --- a/validatron/src/validators.rs +++ b/validatron/src/validators.rs @@ -52,7 +52,10 @@ where R: Display, { if *value < min { - Err(Error::new(format!("'{}' must be greater than or equal to '{}'", value, min))) + Err(Error::new(format!( + "'{}' must be greater than or equal to '{}'", + value, min + ))) } else { Ok(()) } @@ -93,7 +96,10 @@ where R: Display, { if *value > max { - Err(Error::new(format!("'{}' must be less than or equal to '{}'", value, max))) + Err(Error::new(format!( + "'{}' must be less than or equal to '{}'", + value, max + ))) } else { Ok(()) } diff --git a/validatron_derive/Cargo.toml b/validatron_derive/Cargo.toml index 8b8d2fe..ca82449 100644 --- a/validatron_derive/Cargo.toml +++ b/validatron_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "validatron_derive" -version = "0.2.0" +version = "0.2.1" authors = ["Frankie Foston "] edition = "2018" license = "MIT"