Skip to content

Commit

Permalink
Add defaults for utility (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone authored Jul 28, 2022
1 parent a76a73c commit 3a44aea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proposals/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "webb-proposals"
version = "0.4.3"
version = "0.4.4"
edition = "2021"
description = "Webb Protocol Proposals Specification & Implementation (part of webb-rs SDK)"
categories = ["encoding", "no-std"]
Expand Down
12 changes: 12 additions & 0 deletions proposals/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ pub enum TypedChainId {
Ink(u32),
}

impl Default for TypedChainId {
fn default() -> Self {
TypedChainId::None
}
}

/// Proposal Header (40 bytes).
/// ┌────────────────────┬─────────────────┬───────────────┐
/// │ │ │ │
Expand Down Expand Up @@ -384,6 +390,12 @@ impl From<TargetSystem> for [u8; TargetSystem::LENGTH] {
}
}

impl Default for TargetSystem {
fn default() -> Self {
TargetSystem::TreeId(0)
}
}

impl FunctionSignature {
/// Length of the `FunctionSignature` (4 bytes).
pub const LENGTH: usize = 4;
Expand Down

0 comments on commit 3a44aea

Please sign in to comment.