(info: &FieldInfo)
| 241 | } |
| 242 | |
| 243 | fn map_into_fields(info: &FieldInfo) -> proc_macro2::TokenStream { |
| 244 | let ident = info.field.ident.as_ref().unwrap(); |
| 245 | |
| 246 | if info.is_option() { |
| 247 | if info.is_nested_validify() && info.is_list() { |
| 248 | return quote!(#ident: original.#ident.map(|v| v.into_iter().map(|el|el.into()).collect()),); |
| 249 | } |
| 250 | |
| 251 | if info.is_nested_validify() { |
| 252 | return quote!(#ident: original.#ident.map(|o|o.into()),); |
| 253 | } |
| 254 | |
| 255 | quote!(#ident: original.#ident,) |
| 256 | } else { |
| 257 | if info.is_nested_validify() && info.is_list() { |
| 258 | return quote!(#ident: Some(original.#ident.into_iter().map(|el|el.into()).collect()),); |
| 259 | } |
| 260 | |
| 261 | if info.is_nested_validify() { |
| 262 | return quote!(#ident: Some(original.#ident.into()),); |
| 263 | } |
| 264 | |
| 265 | quote!(#ident: Some(original.#ident),) |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | fn payload_path_angle_bracketed(path: &mut syn::TypePath) { |
| 270 | // Type is contained in a List<T>. It will always have angle args and will |
nothing calls this directly
no test coverage detected