Skip to content

Commit

Permalink
lowercase ensure error message and remove period.
Browse files Browse the repository at this point in the history
Co-authored-by: teenjuna <53595243+teenjuna@users.noreply.github.com>
  • Loading branch information
bheylin and teenjuna committed Jul 6, 2021
1 parent 02ab51c commit fdda5c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prae_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn define(input: TokenStream) -> TokenStream {
GuardClosure::Ensure(EnsureClosure(closure)) => quote! {
fn validate(v: &Self::Target) -> Option<prae::ValidationError> {
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! {
Expand Down

0 comments on commit fdda5c4

Please sign in to comment.