From 8e9b02e7f175e0635b95dd00bc26594db071dccb Mon Sep 17 00:00:00 2001 From: cksac Date: Thu, 26 Sep 2024 00:07:18 +0800 Subject: [PATCH] update version --- README.md | 2 +- dummy_derive/Cargo.toml | 2 +- fake/Cargo.toml | 4 ++-- fake/README.md | 2 +- fake/src/impls/glam/mod.rs | 1 - fake/tests/derive_macros.rs | 15 ++++++++++++++- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 801572c..5b21e6b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Default: ```toml [dependencies] -fake = { version = "2.9.2", features = ["derive"] } +fake = { version = "2.10.0", features = ["derive"] } ``` Available features: diff --git a/dummy_derive/Cargo.toml b/dummy_derive/Cargo.toml index 5419f13..0ecd999 100644 --- a/dummy_derive/Cargo.toml +++ b/dummy_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dummy" -version = "0.7.0" +version = "0.8.0" authors = ["cksac "] description = "Macros implementation of #[derive(Dummy)]" keywords = ["faker", "data", "random"] diff --git a/fake/Cargo.toml b/fake/Cargo.toml index ebe90ec..3236cbb 100644 --- a/fake/Cargo.toml +++ b/fake/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fake" -version = "2.9.2" +version = "2.10.0" authors = ["cksac "] description = "An easy to use library for generating fake data like name, number, address, lorem, dates, etc." keywords = ["faker", "data", "generator", "random"] @@ -15,7 +15,7 @@ rust-version = "1.63" all-features = true [dependencies] -dummy = { version = "0.7", path = "../dummy_derive", optional = true } +dummy = { version = "0.8", path = "../dummy_derive", optional = true } rand = "0.8" random_color = { version = "0.8", optional = true } deunicode = "1.4" diff --git a/fake/README.md b/fake/README.md index 57ea794..55e0e15 100644 --- a/fake/README.md +++ b/fake/README.md @@ -11,7 +11,7 @@ Default: ```toml [dependencies] -fake = { version = "2.9.2", features = ["derive"] } +fake = { version = "2.10.0", features = ["derive"] } ``` Available features: diff --git a/fake/src/impls/glam/mod.rs b/fake/src/impls/glam/mod.rs index 390670a..1dace51 100644 --- a/fake/src/impls/glam/mod.rs +++ b/fake/src/impls/glam/mod.rs @@ -10,7 +10,6 @@ impl Dummy for Mat3 { } } - impl Dummy for Mat4 { fn dummy_with_rng(_f: &Faker, rng: &mut R) -> Self { let col_1: Vec4 = Faker.fake_with_rng(rng); diff --git a/fake/tests/derive_macros.rs b/fake/tests/derive_macros.rs index 672ea72..0728a9a 100644 --- a/fake/tests/derive_macros.rs +++ b/fake/tests/derive_macros.rs @@ -75,6 +75,19 @@ mod field_options { assert_eq!(o, MyEnum::Two { x: 89, y: 0, z: 1 }); } + + #[test] + #[allow(dead_code)] + fn with_skip_variant() { + #[derive(Eq, PartialEq, Debug, Dummy)] + enum MyEnum { + One, + #[dummy(skip)] + Two, + } + let o: MyEnum = Faker.fake_with_rng(&mut rng()); + assert_eq!(o, MyEnum::One); + } } mod unit_struct { @@ -355,7 +368,7 @@ mod test_generic { let o: MyEnum = Faker.fake_with_rng(&mut rng()); - assert_eq!(o, MyEnum::F2(0.8961542)); + assert_eq!(o, MyEnum::F2(0.56344515)); } #[test]