From 51437a121091d1767759e912a39196707bae72ff Mon Sep 17 00:00:00 2001 From: ihor rudynskyi Date: Mon, 23 Dec 2024 01:24:42 +0100 Subject: [PATCH] replace Ident with Path --- poem-openapi-derive/src/common_args.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/poem-openapi-derive/src/common_args.rs b/poem-openapi-derive/src/common_args.rs index 2947c006bc..7da2a8e97d 100644 --- a/poem-openapi-derive/src/common_args.rs +++ b/poem-openapi-derive/src/common_args.rs @@ -224,7 +224,7 @@ pub(crate) struct ExtraHeader { pub(crate) enum LitOrPath { Lit(T), - Path(syn::Ident), + Path(syn::Path), } impl darling::FromMeta for LitOrPath @@ -234,61 +234,61 @@ where fn from_nested_meta(item: &darling::ast::NestedMeta) -> darling::Result { T::from_nested_meta(item) .map(Self::Lit) - .or_else(|_| syn::Ident::from_nested_meta(item).map(Self::Path)) + .or_else(|_| syn::Path::from_nested_meta(item).map(Self::Path)) } fn from_meta(item: &syn::Meta) -> darling::Result { T::from_meta(item) .map(Self::Lit) - .or_else(|_| syn::Ident::from_meta(item).map(Self::Path)) + .or_else(|_| syn::Path::from_meta(item).map(Self::Path)) } fn from_none() -> Option { T::from_none() .map(Self::Lit) - .or_else(|| syn::Ident::from_none().map(Self::Path)) + .or_else(|| syn::Path::from_none().map(Self::Path)) } fn from_word() -> darling::Result { T::from_word() .map(Self::Lit) - .or_else(|_| syn::Ident::from_word().map(Self::Path)) + .or_else(|_| syn::Path::from_word().map(Self::Path)) } fn from_list(items: &[darling::ast::NestedMeta]) -> darling::Result { T::from_list(items) .map(Self::Lit) - .or_else(|_| syn::Ident::from_list(items).map(Self::Path)) + .or_else(|_| syn::Path::from_list(items).map(Self::Path)) } fn from_value(value: &Lit) -> darling::Result { T::from_value(value) .map(Self::Lit) - .or_else(|_| syn::Ident::from_value(value).map(Self::Path)) + .or_else(|_| syn::Path::from_value(value).map(Self::Path)) } fn from_expr(expr: &syn::Expr) -> darling::Result { T::from_expr(expr) .map(Self::Lit) - .or_else(|_| syn::Ident::from_expr(expr).map(Self::Path)) + .or_else(|_| syn::Path::from_expr(expr).map(Self::Path)) } fn from_char(value: char) -> darling::Result { T::from_char(value) .map(Self::Lit) - .or_else(|_| syn::Ident::from_char(value).map(Self::Path)) + .or_else(|_| syn::Path::from_char(value).map(Self::Path)) } fn from_string(value: &str) -> darling::Result { T::from_string(value) .map(Self::Lit) - .or_else(|_| syn::Ident::from_string(value).map(Self::Path)) + .or_else(|_| syn::Path::from_string(value).map(Self::Path)) } fn from_bool(value: bool) -> darling::Result { T::from_bool(value) .map(Self::Lit) - .or_else(|_| syn::Ident::from_bool(value).map(Self::Path)) + .or_else(|_| syn::Path::from_bool(value).map(Self::Path)) } }