From 3e1ab76c21329ec9c0bc1eaf3d9af0a439ff2ec7 Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Sat, 29 Feb 2020 23:36:39 +0000 Subject: [PATCH] Parse types as syn::Type, not syn::ExprPath. #[schemars(with= "()")] should now work! --- schemars_derive/src/attr/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemars_derive/src/attr/mod.rs b/schemars_derive/src/attr/mod.rs index 2c11908..6330fa7 100644 --- a/schemars_derive/src/attr/mod.rs +++ b/schemars_derive/src/attr/mod.rs @@ -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> { +pub fn get_with_from_attrs(field: &syn::Field) -> Option> { field .attrs .iter()