Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

READY : variadic_from fix #1267

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions module/core/variadic_from/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ Variadic from
<!-- {{# generate.module{} #}} -->

```rust
use variadic_from::exposed::*;

#[ cfg( all(feature = "enabled", feature = "type_variadic_from" ) )]
fn main()
{
use variadic_from::exposed::*;

#[ derive( Debug, PartialEq, Default, VariadicFrom ) ]
struct StructNamedFields
{
Expand All @@ -34,8 +35,10 @@ fn main()
let got : StructNamedFields = ( 13, 14 ).to();
let exp = StructNamedFields{ a : 13, b : 14 };
assert_eq!( got, exp );

}

#[ cfg( not( all(feature = "enabled", feature = "type_variadic_from" ) ) ) ]
fn main(){}
```

### To add to your project
Expand Down
9 changes: 7 additions & 2 deletions module/core/variadic_from/examples/variadic_from_trivial.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
//! qqq : write proper description
use variadic_from::exposed::*;

#[ cfg( not( all(feature = "enabled", feature = "type_variadic_from" ) ) ) ]
fn main(){}

#[ cfg( all(feature = "enabled", feature = "type_variadic_from" ) )]
fn main()
{
use variadic_from::*;

#[ derive( Debug, PartialEq, Default, VariadicFrom ) ]
struct StructNamedFields
{
Expand All @@ -22,4 +27,4 @@ fn main()
let exp = StructNamedFields{ a : 13, b : 14 };
assert_eq!( got, exp );

}
}
1 change: 1 addition & 0 deletions module/core/variadic_from/tests/variadic_from_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ use variadic_from as the_module;
use test_tools::exposed::*;

// #[ path = "inc.rs" ]
#[ cfg( feature = "enabled" ) ]
mod inc;

Loading