We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93f4bf5 + db0eefc commit 2b27a71Copy full SHA for 2b27a71
nutype_macros/src/common/gen/traits.rs
@@ -294,8 +294,7 @@ pub fn gen_impl_trait_serde_deserialize(
294
quote! {
295
#type_name::try_new(raw_value).map_err(|validation_error| {
296
// Add a hint about which type is causing the error,
297
- let err_msg = format!("{validation_error} Expected valid {}", #type_name_str);
298
- <DE::Error as serde::de::Error>::custom(err_msg)
+ <DE::Error as serde::de::Error>::custom(core::format_args!("{validation_error} Expected valid {}", #type_name_str))
299
})
300
}
301
} else {
0 commit comments