Skip to content

Commit 2418f81

Browse files
committed
fix all issues
1 parent 070f02a commit 2418f81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+178
-236
lines changed

module/core/data_type/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
pub mod dt;
1212

1313
/// Namespace with dependencies.
14-
1514
#[ cfg( feature = "enabled" ) ]
1615
pub mod dependency
1716
{

module/core/derive_tools_meta/src/derive/from.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ fn variant_generate
498498
{
499499
let debug = format!
500500
(
501-
r#"
501+
r"
502502
#[ automatically_derived ]
503503
impl< {0} > From< {args} > for {item_name}< {1} >
504504
where
@@ -510,16 +510,16 @@ where
510510
Self::{variant_name}( {use_src} )
511511
}}
512512
}}
513-
"#,
513+
",
514514
format!( "{}", qt!{ #generics_impl } ),
515515
format!( "{}", qt!{ #generics_ty } ),
516516
format!( "{}", qt!{ #generics_where } ),
517517
);
518518
let about = format!
519519
(
520-
r#"derive : From
520+
r"derive : From
521521
item : {item_name}
522-
field : {variant_name}"#,
522+
field : {variant_name}",
523523
);
524524
diag::report_print( about, original_input, debug );
525525
}

module/core/derive_tools_meta/src/derive/from/field_attributes.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use former_types::Assign;
1414
///
1515
/// Attributes of a field / variant
1616
///
17-
1817
/// Represents the attributes of a struct. Aggregates all its attributes.
1918
#[ derive( Debug, Default ) ]
2019
pub struct FieldAttributes
@@ -181,10 +180,10 @@ impl syn::parse::Parse for FieldAttributeConfig
181180
syn_err!
182181
(
183182
ident,
184-
r#"Expects an attribute of format '#[ from( on ) ]'
183+
r"Expects an attribute of format '#[ from( on ) ]'
185184
{known}
186185
But got: '{}'
187-
"#,
186+
",
188187
qt!{ #ident }
189188
)
190189
};

module/core/derive_tools_meta/src/derive/from/item_attributes.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use former_types::Assign;
1212
///
1313
/// Attributes of the whole tiem
1414
///
15-
1615
/// Represents the attributes of a struct. Aggregates all its attributes.
1716
#[ derive( Debug, Default ) ]
1817
pub struct ItemAttributes
@@ -165,10 +164,10 @@ impl syn::parse::Parse for ItemAttributeConfig
165164
syn_err!
166165
(
167166
ident,
168-
r#"Expects an attribute of format '#[ from( off ) ]'
167+
r"Expects an attribute of format '#[ from( off ) ]'
169168
{known}
170169
But got: '{}'
171-
"#,
170+
",
172171
qt!{ #ident }
173172
)
174173
};

module/core/derive_tools_meta/src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ mod derive;
7979
///
8080
/// The macro facilitates the conversion without additional boilerplate code.
8181
///
82-
8382
#[ cfg( feature = "enabled" ) ]
8483
#[ cfg( feature = "derive_from" ) ]
8584
#[ proc_macro_derive
@@ -134,7 +133,6 @@ pub fn from( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
134133
///
135134
/// The macro facilitates the conversion without additional boilerplate code.
136135
///
137-
138136
#[ cfg( feature = "enabled" ) ]
139137
#[ cfg( feature = "derive_new" ) ]
140138
#[ proc_macro_derive
@@ -229,7 +227,6 @@ pub fn new( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
229227
/// }
230228
/// }
231229
/// ```
232-
233230
#[ cfg( feature = "enabled" ) ]
234231
#[ cfg( feature = "derive_inner_from" ) ]
235232
#[ proc_macro_derive( InnerFrom, attributes( debug ) ) ]
@@ -270,7 +267,6 @@ pub fn inner_from( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
270267
/// }
271268
/// }
272269
/// ```
273-
274270
#[ cfg( feature = "enabled" ) ]
275271
#[ cfg( feature = "derive_deref" ) ]
276272
#[ proc_macro_derive( Deref, attributes( debug ) ) ]
@@ -330,7 +326,6 @@ pub fn deref( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
330326
/// }
331327
///
332328
/// ```
333-
334329
#[ cfg( feature = "enabled" ) ]
335330
#[ cfg( feature = "derive_deref_mut" ) ]
336331
#[ proc_macro_derive( DerefMut, attributes( debug ) ) ]
@@ -369,7 +364,6 @@ pub fn deref_mut( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
369364
/// }
370365
/// }
371366
/// ```
372-
373367
#[ cfg( feature = "enabled" ) ]
374368
#[ cfg( feature = "derive_as_ref" ) ]
375369
#[ proc_macro_derive( AsRef, attributes( debug ) ) ]
@@ -409,7 +403,6 @@ pub fn as_ref( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
409403
/// }
410404
///
411405
/// ```
412-
413406
#[ cfg( feature = "enabled" ) ]
414407
#[ cfg( feature = "derive_as_mut" ) ]
415408
#[ proc_macro_derive( AsMut, attributes( debug ) ) ]
@@ -514,7 +507,6 @@ pub fn as_mut( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
514507
/// }
515508
/// ```
516509
///
517-
518510
#[ cfg( feature = "enabled" ) ]
519511
#[ cfg( feature = "derive_variadic_from" ) ]
520512
#[ proc_macro_derive( VariadicFrom, attributes( debug ) ) ]
@@ -619,7 +611,6 @@ pub fn derive_not( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
619611
///
620612
/// The macro facilitates the addition of the `PhantomData` field without additional boilerplate code.
621613
///
622-
623614
#[ cfg( feature = "enabled" ) ]
624615
#[ cfg ( feature = "derive_phantom" ) ]
625616
#[ proc_macro_attribute ]
@@ -675,7 +666,6 @@ pub fn phantom( _attr: proc_macro::TokenStream, input : proc_macro::TokenStream
675666
/// };
676667
/// ```
677668
///
678-
679669
#[ cfg( feature = "enabled" ) ]
680670
#[ cfg( feature = "derive_index" ) ]
681671
#[ proc_macro_derive
@@ -745,7 +735,6 @@ pub fn derive_index( input : proc_macro::TokenStream ) -> proc_macro::TokenStrea
745735
/// };
746736
/// ```
747737
///
748-
749738
#[ cfg( feature = "enabled" ) ]
750739
#[ cfg( feature = "derive_index_mut" ) ]
751740
#[ proc_macro_derive

module/core/former_meta/src/component/component_from.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub fn component_from( input : proc_macro::TokenStream ) -> Result< proc_macro2:
5656
/// }
5757
/// }
5858
///
59-
6059
fn for_each_field( field : &syn::Field, item_name : &syn::Ident ) -> Result< proc_macro2::TokenStream >
6160
{
6261
let field_name = field.ident.as_ref()

module/core/former_meta/src/component/components_assign.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#[ allow( clippy::wildcard_imports ) ]
22
use super::*;
33
use macro_tools::{ attr, diag, Result, format_ident };
4-
use iter_tools::{ Itertools };
4+
use iter_tools::Itertools;
55

66
///
77
/// Generate `ComponentsAssign` trait implementation for the type, providing `components_assign` function
88
///
99
/// Output example can be found in in the root of the module
1010
///
11-
1211
pub fn components_assign( input : proc_macro::TokenStream ) -> Result< proc_macro2::TokenStream >
1312
{
1413
use convert_case::{ Case, Casing };

module/core/former_meta/src/component/from_components.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ use macro_tools::{ attr, diag, item_struct, Result };
3232
/// }
3333
/// ```
3434
///
35-
3635
#[ inline ]
3736
pub fn from_components( input : proc_macro::TokenStream ) -> Result< proc_macro2::TokenStream >
3837
{
@@ -97,7 +96,6 @@ pub fn from_components( input : proc_macro::TokenStream ) -> Result< proc_macro2
9796
/// ```
9897
///
9998
/// These trait bounds are then used in the `From<T>` implementation to ensure type compatibility.
100-
10199
#[ inline ]
102100
// fn trait_bounds( field_types : &[ &syn::Type ] ) -> Vec< proc_macro2::TokenStream >
103101
fn trait_bounds< 'a >( field_types : impl macro_tools::IterTrait< 'a, &'a syn::Type > ) -> Vec< proc_macro2::TokenStream >
@@ -125,7 +123,6 @@ fn trait_bounds< 'a >( field_types : impl macro_tools::IterTrait< 'a, &'a syn::T
125123
/// let field2 = Into::< String >::into( src.clone() );
126124
/// ```
127125
///
128-
129126
#[ inline ]
130127
fn field_assign< 'a >( fields : impl Iterator< Item = &'a syn::Field > ) -> Vec< proc_macro2::TokenStream >
131128
{

module/core/former_meta/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ pub fn former( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
157157
/// # }
158158
/// ```
159159
///
160-
161160
#[ cfg( feature = "enabled" ) ]
162161
#[ cfg( feature = "derive_component_from" ) ]
163162
#[ proc_macro_derive( ComponentFrom, attributes( debug ) ) ]
@@ -250,7 +249,6 @@ pub fn component_from( input : proc_macro::TokenStream ) -> proc_macro::TokenStr
250249
/// ```
251250
/// This allows any type that can be converted into an `i32` or `String` to be set as
252251
/// the value of the `age` or `name` fields of `Person` instances, respectively.
253-
254252
#[ cfg( feature = "enabled" ) ]
255253
#[ cfg( feature = "derive_component_assign" ) ]
256254
#[ proc_macro_derive( Assign, attributes( debug ) ) ]
@@ -503,7 +501,6 @@ pub fn component_assign( input : proc_macro::TokenStream ) -> proc_macro::TokenS
503501
/// take_smaller_opts( &options2 );
504502
/// ```
505503
///
506-
507504
#[ cfg( feature = "enabled" ) ]
508505
#[ cfg( all( feature = "derive_component_assign", feature = "derive_components_assign" ) ) ]
509506
#[ proc_macro_derive( ComponentsAssign, attributes( debug ) ) ]
@@ -604,7 +601,6 @@ pub fn components_assign( input : proc_macro::TokenStream ) -> proc_macro::Token
604601
/// automatically generating the necessary `From< &Options1 >` implementation for `Options2`, facilitating
605602
/// an easy conversion between these types based on their compatible fields.
606603
///
607-
608604
#[ cfg( feature = "enabled" ) ]
609605
#[ cfg( feature = "derive_from_components" ) ]
610606
#[ proc_macro_derive( FromComponents, attributes( debug ) ) ]

module/core/iter_tools/src/iter.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ mod private
163163
pub type BoxedIter< 'a, T > = Box< dyn _IterTrait< 'a, T > + 'a >;
164164

165165
/// Extension of iterator.
166-
167166
// zzz : review
168167
#[ cfg( feature = "iter_ext" ) ]
169168
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
@@ -297,10 +296,7 @@ pub mod exposed
297296
#[ doc( inline ) ]
298297
#[ cfg( feature = "iter_trait" ) ]
299298
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
300-
pub use private::
301-
{
302-
BoxedIter,
303-
};
299+
pub use private::BoxedIter;
304300

305301

306302

0 commit comments

Comments
 (0)