Skip to content

Commit

Permalink
Merge pull request #1415 from Inkvisto/willbe_former_meta
Browse files Browse the repository at this point in the history
READY: (willbe) former_meta warnings fixes
  • Loading branch information
Wandalen authored Aug 1, 2024
2 parents 1b4ea83 + 25bb943 commit 6730133
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion module/core/former_meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ convert_case = { version = "0.6.0", default-features = false, optional = true, f

[dev-dependencies]
test_tools = { workspace = true, features = [ "full" ] }
# former = { workspace = true, features = [ "full" ] }
20 changes: 12 additions & 8 deletions module/core/former_meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mod component
///
/// Below is a typical usage example where the macro is applied to a struct:
///
/// ```rust
/// ```rust, ignore
///
/// # #[ cfg( all( feature = "derive_former", feature = "enabled" ) ) ]
/// # fn main()
Expand Down Expand Up @@ -139,7 +139,9 @@ pub fn former( input : proc_macro::TokenStream ) -> proc_macro::TokenStream
/// ```rust
/// # fn main()
/// # {
/// #[ derive( former::ComponentFrom ) ]
/// use former_meta::ComponentFrom;
///
/// #[ derive( ComponentFrom ) ]
/// struct Person
/// {
/// pub age : i32,
Expand Down Expand Up @@ -191,9 +193,10 @@ pub fn component_from( input : proc_macro::TokenStream ) -> proc_macro::TokenStr
/// Given a struct definition annotated with `#[ derive( Assign ) ]` :
///
/// ```rust
/// use former::Assign;
/// use former_types::Assign;
/// use former_meta::Assign;
///
/// #[ derive( Default, PartialEq, Debug, former::Assign ) ]
/// #[ derive( Default, PartialEq, Debug, Assign ) ]
/// struct Person
/// {
/// age : i32,
Expand All @@ -211,7 +214,8 @@ pub fn component_from( input : proc_macro::TokenStream ) -> proc_macro::TokenStr
/// The procedural macro generates the following implementations for `Person` :
///
/// ```rust
/// use former::Assign;
/// use former_types::Assign;
/// use former_meta::Assign;
///
/// #[ derive( Default, PartialEq, Debug ) ]
/// struct Person
Expand Down Expand Up @@ -283,7 +287,7 @@ pub fn component_assign( input : proc_macro::TokenStream ) -> proc_macro::TokenS
///
/// An example when we encapsulate parameters passed to a function in a struct.
///
/// ```rust
/// ```rust, ignore
/// use former::{ Assign, ComponentsAssign };
///
/// #[ derive( Default, Assign, ComponentsAssign ) ]
Expand Down Expand Up @@ -342,7 +346,7 @@ pub fn component_assign( input : proc_macro::TokenStream ) -> proc_macro::TokenS
///
/// Which expands approximately into :
///
/// ```rust
/// ```rust, ignore
/// use former::{ Assign, ComponentsAssign };
///
/// #[derive(Default)]
Expand Down Expand Up @@ -537,7 +541,7 @@ pub fn components_assign( input : proc_macro::TokenStream ) -> proc_macro::Token
/// Given the structs `Options1` and `Options2`, where `Options2` is a subset of `Options1`:
///
/// ```rust
/// use former::FromComponents;
/// use former_meta::FromComponents;
///
/// #[ derive( Debug, Default, PartialEq ) ]
/// pub struct Options1
Expand Down

0 comments on commit 6730133

Please sign in to comment.