Skip to content

Commit 573005a

Browse files
authored
Reverting re-introduced num-derive dependencies
1 parent d20599d commit 573005a

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ strict_encoding_derive = "1"
4747
lightning_encoding = "0.4.0-beta.1"
4848
client_side_validation = "0.4"
4949
descriptor-wallet = "0.4"
50-
# We use these to simplify enum strict encoding, but once the required
51-
# functionality will become part of either amplify_derive or lnpbp_derive
52-
# crates they should be removed
53-
num-traits = "~0.2.11"
54-
num-derive = "~0.3.0"
5550
# Dependencies on core rust-bitcoin ecosystem projects
5651
# ----------------------------------------------------
5752
bitcoin = { version = "~0.26.0", features = ["rand"] }

src/chain.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,6 @@ lazy_static! {
412412
Hash,
413413
StrictEncode,
414414
StrictDecode,
415-
FromPrimitive,
416-
ToPrimitive,
417415
)]
418416
#[display(Debug)]
419417
#[cfg_attr(
@@ -443,8 +441,6 @@ pub enum ChainFormat {
443441
Hash,
444442
StrictEncode,
445443
StrictDecode,
446-
FromPrimitive,
447-
ToPrimitive,
448444
)]
449445
#[display(Debug)]
450446
#[cfg_attr(
@@ -457,11 +453,11 @@ pub enum AssetLayer {
457453
/// Native chain asset(s), which can operate both on the layer of
458454
/// blockchain and payment/state channels (Bitcoin, sidechain-specific
459455
/// asset(s), like liquidBTC or confidential assets in Liquid)
460-
Layer1and2 = 0,
456+
Layer1and2 = 1,
461457

462458
/// Derived assets, which are created and defined above blockchain (like
463459
/// RGB), but also can be used on top of payment/state channels
464-
Layer2and3 = 1,
460+
Layer2and3 = 2,
465461
}
466462

467463
#[derive(
@@ -476,8 +472,6 @@ pub enum AssetLayer {
476472
Hash,
477473
StrictEncode,
478474
StrictDecode,
479-
FromPrimitive,
480-
ToPrimitive,
481475
)]
482476
#[cfg_attr(
483477
feature = "serde",
@@ -1176,8 +1170,8 @@ mod test {
11761170
);
11771171

11781172
test_enum_u8_exhaustive!(AssetLayer;
1179-
AssetLayer::Layer1and2 => 0,
1180-
AssetLayer::Layer2and3 => 1
1173+
AssetLayer::Layer1and2 => 1,
1174+
AssetLayer::Layer2and3 => 2
11811175
);
11821176

11831177
test_enum_u8_exhaustive!(AssetSystem;

0 commit comments

Comments
 (0)