We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Infallible
1 parent 1198976 commit 280fbb9Copy full SHA for 280fbb9
1 file changed
packages/fortifier-macros/src/validate.rs
@@ -116,7 +116,14 @@ impl<'a> ToTokens for Validate<'a> {
116
{
117
(r#type, definition)
118
} else {
119
- (quote!(::std::convert::Infallible), None)
+ let error_ident = format_error_ident(self.ident);
120
+
121
+ (
122
+ error_ident.to_token_stream(),
123
+ Some(quote! {
124
+ type #error_ident = ::std::convert::Infallible;
125
+ }),
126
+ )
127
};
128
129
let sync_validations = self.validations(Execution::Sync);
0 commit comments