Parse types as syn::Type, not syn::ExprPath.

#[schemars(with= "()")] should now work!
This commit is contained in:
Graham Esau 2020-02-29 23:36:39 +00:00
parent d7c9222330
commit 3e1ab76c21

View file

@ -7,7 +7,7 @@ pub use schemars_to_serde::process_serde_attrs;
use proc_macro2::{Group, Span, TokenStream, TokenTree};
use syn::parse::{self, Parse};
pub fn get_with_from_attrs(field: &syn::Field) -> Option<syn::Result<syn::ExprPath>> {
pub fn get_with_from_attrs(field: &syn::Field) -> Option<syn::Result<syn::Type>> {
field
.attrs
.iter()