From 339aeb347a142aab0b6de90b6c03aee1526e5f54 Mon Sep 17 00:00:00 2001 From: James Tomlinson Date: Mon, 11 Mar 2024 14:45:48 +0000 Subject: [PATCH] chore: Applying cargo fmt to macros lib.rs --- pywr-schema-macros/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pywr-schema-macros/src/lib.rs b/pywr-schema-macros/src/lib.rs index e5de8f38..827560d8 100644 --- a/pywr-schema-macros/src/lib.rs +++ b/pywr-schema-macros/src/lib.rs @@ -17,7 +17,7 @@ enum PywrField { /// Generates a [`TokenStream`] containing the implementation of two methods, `parameters` /// and `parameters_mut`, for the given struct. /// -/// Both method returns a [`HashMap`] of parameter names to [`DynamicFloatValue`]. This +/// Both method returns a [`HashMap`] of parameter names to [`DynamicFloatValue`]. This /// is intended to be used for nodes and parameter structs in the Pywr schema. fn impl_parameter_references_derive(ast: &syn::DeriveInput) -> TokenStream { // Name of the node type @@ -157,9 +157,7 @@ fn type_to_ident(ty: &syn::Type) -> Option { // Match on path types that are no self types. let arg_type_path = match arg_ty { Some(ty) => match ty { - syn::Type::Path(type_path) if type_path.qself.is_none() => { - Some(type_path) - } + syn::Type::Path(type_path) if type_path.qself.is_none() => Some(type_path), _ => None, }, None => None, @@ -195,4 +193,4 @@ fn is_parameter_ident(ident: &syn::Ident) -> bool { // TODO this currenty omits more complex attributes, such as `factors` for AggregatedNode // and steps for PiecewiseLinks, that can internally contain `DynamicFloatValue` fields ident == "DynamicFloatValue" -} \ No newline at end of file +}