#![allow(dead_code)] use ::proc_macro2::TokenStream; use ::std::prelude::v1::*; pub trait SynResultExt { fn unwrap_err_string(self) -> String; } impl SynResultExt for ::syn::Result { fn unwrap_err_string(self) -> String { self.unwrap_err() .into_iter() .map(|e| e.to_string()) .collect::>() .join(", ") } } #[inline] pub fn parse_meta(s: TokenStream) -> ::deluxe::Result { use ::syn::parse::Parser; let parser = |stream: ::syn::parse::ParseStream<'_>| { ::parse_meta_item(stream, ::deluxe::ParseMode::Unnamed) }; parser.parse2(s) } #[inline] pub fn parse_flag() -> ::deluxe::Result { use ::syn::parse::Parser; let parser = |stream: ::syn::parse::ParseStream<'_>| { ::parse_meta_item_flag(stream.span()) }; parser.parse2(Default::default()) }