Skip to content

Commit 390fa2b

Browse files
committed
Add From<u32> for Position
1 parent 9510fc9 commit 390fa2b

File tree

1 file changed

+6
-0
lines changed
  • incrementalmerkletree/src

1 file changed

+6
-0
lines changed

incrementalmerkletree/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ impl From<Position> for u64 {
141141
}
142142
}
143143

144+
impl From<u32> for Position {
145+
fn from(sz: u32) -> Self {
146+
Self(sz.into())
147+
}
148+
}
149+
144150
impl From<u64> for Position {
145151
fn from(sz: u64) -> Self {
146152
Self(sz)

0 commit comments

Comments
 (0)