Skip to content

Commit 5bb154c

Browse files
committed
fix clippy
1 parent fe55b81 commit 5bb154c

File tree

22 files changed

+216
-205
lines changed

22 files changed

+216
-205
lines changed

module/core/former_meta/src/derive_former.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ r"derive : Former
9393
item : {item}",
9494
);
9595
diag::report_print( about, original_input, debug );
96-
};
96+
}
9797

9898
Ok( former_mutator_code )
9999
}

module/core/former_meta/src/derive_former/former_enum.rs

Lines changed: 157 additions & 154 deletions
Large diffs are not rendered by default.

module/core/former_meta/src/derive_former/former_struct.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ specific needs of the broader forming context. It mandates the implementation of
123123
let ( perform, perform_output, perform_generics ) = struct_attrs.performer()?;
124124

125125
/* fields: Process struct fields and storage_fields attribute. */
126-
let fields = derive::named_fields( &ast )?;
126+
let fields = derive::named_fields( ast )?;
127127
// Create FormerField representation for actual struct fields.
128128
let formed_fields : Vec< _ > = fields
129129
.iter()
@@ -226,7 +226,7 @@ specific needs of the broader forming context. It mandates the implementation of
226226
field.former_field_setter
227227
(
228228
item,
229-
&original_input,
229+
original_input,
230230
&struct_generics_impl,
231231
&struct_generics_ty,
232232
&struct_generics_where,
@@ -244,7 +244,7 @@ specific needs of the broader forming context. It mandates the implementation of
244244
// Collect preform logic results.
245245
let storage_field_preform : Vec< _ > = storage_field_preform.into_iter().collect::< Result< _ > >()?;
246246
// Generate mutator implementation code.
247-
let former_mutator_code = mutator( item, &original_input, &struct_attrs.mutator, &former_definition_types, &former_definition_types_generics_impl, &former_definition_types_generics_ty, &former_definition_types_generics_where )?;
247+
let former_mutator_code = mutator( item, original_input, &struct_attrs.mutator, &former_definition_types, &former_definition_types_generics_impl, &former_definition_types_generics_ty, &former_definition_types_generics_where )?;
248248

249249
// <<< Start of updated code for standalone constructor >>>
250250
let standalone_constructor_code = if struct_attrs.standalone_constructors.value( false )

module/core/former_types/src/forming.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ impl< Definition : crate::FormerDefinitionTypes > FormingEndClosure< Definition
193193
/// # Parameters
194194
///
195195
/// * `closure` - A closure that matches the expected signature for transforming a collection
196-
/// and context into a new context. This closure is stored and called by the
197-
/// `call` method of the `FormingEnd` trait implementation.
196+
/// and context into a new context. This closure is stored and called by the
197+
/// `call` method of the `FormingEnd` trait implementation.
198198
///
199199
/// # Returns
200200
///

module/core/macro_tools/src/ident.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ mod private
2929
/// assert_eq!( got_normal.to_string(), "my_var" );
3030
/// assert_eq!( got_keyword.to_string(), "r#fn" );
3131
/// ```
32+
#[must_use]
3233
pub fn ident_maybe_raw( ident : &syn::Ident ) -> Ident
3334
{
3435
let name = ident.to_string();

module/core/macro_tools/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ mod private
7676
},
7777
// Do nothing for unit structs
7878
syn::Fields::Unit => {}
79-
};
79+
}
8080

8181
new_input
8282
}

module/core/macro_tools/src/phantom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ mod private
110110
}
111111
)
112112
}
113-
};
113+
}
114114

115115
input
116116
}

module/core/macro_tools/src/typ.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ mod private
5858
/// ```
5959
/// # Panics
6060
/// qqq: doc
61-
#[ allow( clippy::cast_possible_wrap ) ]
62-
pub fn type_parameters< 'a >( ty : &'a syn::Type, range : impl NonIterableInterval ) -> Vec< &'a syn::Type >
61+
#[ allow( clippy::cast_possible_wrap, clippy::needless_pass_by_value ) ]
62+
pub fn type_parameters( ty : &syn::Type, range : impl NonIterableInterval ) -> Vec< &syn::Type >
6363
{
6464
if let syn::Type::Path( syn::TypePath{ path : syn::Path { ref segments, .. }, .. } ) = ty
6565
{

module/core/mod_interface_meta/src/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ mod private
496496
syn::Result::Ok( () )
497497
})?;
498498
}
499-
};
499+
}
500500

501501
syn::Result::Ok( () )
502502
})?;

module/core/mod_interface_meta/src/use_tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod private
8282
{
8383
return Err( syn_err!( "Complex group uses like `use module1::{ module2, module3 }` are not supported." ) );
8484
},
85-
};
85+
}
8686
}
8787

8888
Ok( path )
@@ -187,7 +187,7 @@ mod private
187187
group = true;
188188
break;
189189
},
190-
};
190+
}
191191
}
192192

193193
Ok( Self

0 commit comments

Comments
 (0)