diff options
| author | Bastien Orivel | 2018-01-28 22:46:03 +0100 |
|---|---|---|
| committer | Bastien Orivel | 2018-01-28 22:46:03 +0100 |
| commit | cd6cf76e5a890dec01f3616c7df4f4b86a4ea1a5 (patch) | |
| tree | 27d9dff09b0ec779b9727005830920b4882227d5 /validator_derive | |
| parent | ab55eacbf9babb664657757c92d0b44b084385d8 (diff) | |
| download | validator-cd6cf76e5a890dec01f3616c7df4f4b86a4ea1a5.tar.bz2 | |
Don't emit a warning when a struct with no validator derives Validate
Diffstat (limited to 'validator_derive')
| -rw-r--r-- | validator_derive/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/validator_derive/src/lib.rs b/validator_derive/src/lib.rs index 1678883..6700c2a 100644 --- a/validator_derive/src/lib.rs +++ b/validator_derive/src/lib.rs @@ -74,6 +74,7 @@ fn impl_validate(ast: &syn::MacroInput) -> quote::Tokens { let (impl_generics, ty_generics, where_clause) = ast.generics.split_for_impl(); let impl_ast = quote!( impl #impl_generics Validate for #ident #ty_generics #where_clause { + #[allow(unused_mut)] fn validate(&self) -> ::std::result::Result<(), ::validator::ValidationErrors> { let mut errors = ::validator::ValidationErrors::new(); |
