From df1c83ffdcc261feca48a035902d8cb51eee58af Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Tue, 5 Sep 2023 15:12:31 +1200 Subject: [PATCH] Fix issues for cargo fmt in 1.72 (#940) This PR fixes code formatting for Rust 1.72. --- macros/src/has_spaces_impl.rs | 3 ++- macros/src/plan_trace_object_impl.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/macros/src/has_spaces_impl.rs b/macros/src/has_spaces_impl.rs index dbf6da6ed3..71286e415d 100644 --- a/macros/src/has_spaces_impl.rs +++ b/macros/src/has_spaces_impl.rs @@ -12,7 +12,8 @@ pub(crate) fn derive(input: DeriveInput) -> TokenStream2 { let syn::Data::Struct(syn::DataStruct { fields: syn::Fields::Named(ref fields), .. - }) = input.data else { + }) = input.data + else { abort_call_site!("`#[derive(HasSpaces)]` only supports structs with named fields."); }; diff --git a/macros/src/plan_trace_object_impl.rs b/macros/src/plan_trace_object_impl.rs index b5241bfd04..7be2e44c9a 100644 --- a/macros/src/plan_trace_object_impl.rs +++ b/macros/src/plan_trace_object_impl.rs @@ -12,7 +12,8 @@ pub(crate) fn derive(input: DeriveInput) -> TokenStream2 { let syn::Data::Struct(syn::DataStruct { fields: syn::Fields::Named(ref fields), .. - }) = input.data else { + }) = input.data + else { abort_call_site!("`#[derive(PlanTraceObject)]` only supports structs with named fields."); };