From fdda5c4d427703f6740d095248ce4ec83f3bf196 Mon Sep 17 00:00:00 2001 From: Obscene Giraffe <3947+ObsceneGiraffe@users.noreply.github.com> Date: Tue, 6 Jul 2021 09:05:24 +0200 Subject: [PATCH] lowercase `ensure` error message and remove period. Co-authored-by: teenjuna <53595243+teenjuna@users.noreply.github.com> --- prae_macro/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prae_macro/src/lib.rs b/prae_macro/src/lib.rs index a7d94f5..fc0007e 100644 --- a/prae_macro/src/lib.rs +++ b/prae_macro/src/lib.rs @@ -36,7 +36,7 @@ pub fn define(input: TokenStream) -> TokenStream { GuardClosure::Ensure(EnsureClosure(closure)) => quote! { fn validate(v: &Self::Target) -> Option { let f: fn(&Self::Target) -> bool = #closure; - if f(v) { None } else { Some(prae::ValidationError::new::<#ty>("Validation failed.") ) } + if f(v) { None } else { Some(prae::ValidationError::new::<#ty>("provided value is invalid") ) } } }, GuardClosure::Validate(ValidateClosure(closure, err_ty)) => quote! {