File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2424// Not needed for 2018 edition and conflicts with `rust_2018_idioms`
2525#![ doc( test( no_crate_inject) ) ]
2626#![ doc( html_root_url = "https://docs.rs/serde_with_macros/1.3.0" ) ]
27+ // Necessary for nightly clippy lints
28+ #![ allow( clippy:: unknown_clippy_lints) ]
2729
2830//! proc-macro extensions for [`serde_with`]
2931//!
@@ -577,6 +579,10 @@ fn serde_as_add_attr_to_field(
577579}
578580
579581/// Parse a [`String`] and return a [`syn::Type`]
582+
583+ // Return type is required by the darling struct fields
584+ // It needs to be an Option, such that is represents an optional field
585+ #[ allow( clippy:: unnecessary_wraps) ]
580586fn parse_type_from_string ( s : String ) -> Option < Result < Type , Error > > {
581587 Some ( syn:: parse_str ( & * s) )
582588}
You can’t perform that action at this time.
0 commit comments