Skip to content

Commit 89b64a6

Browse files
committed
Deprecate enum_behaviour
1 parent 3c51f6e commit 89b64a6

File tree

5 files changed

+163
-54
lines changed

5 files changed

+163
-54
lines changed

Cargo.lock

Lines changed: 29 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

consensus/ssz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = "Apache-2.0"
1010
name = "ssz"
1111

1212
[dev-dependencies]
13-
eth2_ssz_derive = "0.3.1"
13+
eth2_ssz_derive = "0.4.0"
1414

1515
[dependencies]
1616
ethereum-types = "0.12.1"

consensus/ssz/tests/tests.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ mod derive_macro {
387387
}
388388

389389
#[derive(PartialEq, Debug, Encode, Decode)]
390-
#[ssz(enum_behaviour = "union")]
390+
#[ssz(union)]
391391
enum TwoFixedUnion {
392392
U8(u8),
393393
U16(u16),
@@ -422,16 +422,9 @@ mod derive_macro {
422422
b: u8,
423423
}
424424

425-
#[derive(PartialEq, Debug, Encode)]
426-
#[ssz(enum_behaviour = "transparent")]
427-
enum TwoVariableTrans {
428-
A(VariableA),
429-
B(VariableB),
430-
}
431-
432425
#[derive(PartialEq, Debug, Encode)]
433426
#[ssz(transparent)]
434-
enum TwoVariableTransDirectTag {
427+
enum TwoVariableTrans {
435428
A(VariableA),
436429
B(VariableB),
437430
}
@@ -441,16 +434,9 @@ mod derive_macro {
441434
a: TwoVariableTrans,
442435
}
443436

444-
#[derive(PartialEq, Debug, Encode, Decode)]
445-
#[ssz(enum_behaviour = "union")]
446-
enum TwoVariableUnion {
447-
A(VariableA),
448-
B(VariableB),
449-
}
450-
451437
#[derive(PartialEq, Debug, Encode, Decode)]
452438
#[ssz(union)]
453-
enum TwoVariableUnionDirectTag {
439+
enum TwoVariableUnion {
454440
A(VariableA),
455441
B(VariableB),
456442
}
@@ -509,7 +495,7 @@ mod derive_macro {
509495
}
510496

511497
#[derive(PartialEq, Debug, Encode, Decode)]
512-
#[ssz(enum_behaviour = "union")]
498+
#[ssz(union)]
513499
enum TwoVecUnion {
514500
A(Vec<u8>),
515501
B(Vec<u8>),

consensus/ssz_derive/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "eth2_ssz_derive"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
authors = ["Paul Hauner <[email protected]>"]
55
edition = "2021"
66
description = "Procedural derive macros to accompany the eth2_ssz crate."
@@ -17,3 +17,4 @@ quote = "1.0.7"
1717
darling = "0.13.0"
1818

1919
[dev-dependencies]
20+
eth2_ssz = "0.4.1"

0 commit comments

Comments
 (0)