File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,10 @@ impl<T: ?Sized + Committable> Commitment<T> {
132
132
pub fn into_bits ( self ) -> BitVec < u8 , bitvec:: order:: Lsb0 > {
133
133
BitVec :: try_from ( self . 0 . to_vec ( ) ) . unwrap ( )
134
134
}
135
+
136
+ pub fn from_raw ( bytes : [ u8 ; 32 ] ) -> Self {
137
+ Self ( bytes, PhantomData )
138
+ }
135
139
}
136
140
137
141
// clippy pacification: `non_canonical_clone_impl` aka `incorrect_clone_impl_on_copy_type`
@@ -153,10 +157,6 @@ impl<T: ?Sized + Committable> From<Commitment<T>> for [u8; 32] {
153
157
}
154
158
}
155
159
156
- pub fn from_raw < T : ?Sized + Committable > ( bytes : [ u8 ; 32 ] ) -> Commitment < T > {
157
- Commitment ( bytes, PhantomData )
158
- }
159
-
160
160
impl < ' a , T : ?Sized + Committable > Arbitrary < ' a > for Commitment < T > {
161
161
fn arbitrary ( u : & mut Unstructured < ' a > ) -> arbitrary:: Result < Self > {
162
162
Ok ( Self ( u. arbitrary ( ) ?, PhantomData ) )
You can’t perform that action at this time.
0 commit comments