File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use simplicity_sys::CFrameItem;
1717/// and to the target_type of jet.
1818pub struct JetBuffer {
1919 #[ allow( dead_code) ]
20- cells : Vec < usize > ,
20+ cells : Vec < UWORD > ,
2121 src_bit_width : usize ,
2222 dst_bit_width : usize ,
2323 src_ptr_begin : * mut UWORD ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use rand::distributions as dist;
55use rand:: rngs:: ThreadRng ;
66use rand:: { Rng , RngCore } ;
77use simplicity:: ffi:: c_jets:: frame_ffi:: c_writeBit;
8+ use simplicity:: ffi:: ffi:: UWORD ;
89use simplicity:: ffi:: CFrameItem ;
910use simplicity:: hashes:: Hash ;
1011use simplicity:: jet:: Elements ;
@@ -309,8 +310,8 @@ impl FlatValue {
309310 unsafe {
310311 use simplicity:: elements:: hashes:: Hash as _;
311312
312- let mut dst_inner = [ 0usize ; MAX_VALUE_BYTES / mem:: size_of :: < usize > ( ) ] ;
313- let mut src_inner = [ 0usize ; MAX_VALUE_BYTES / mem:: size_of :: < usize > ( ) ] ;
313+ let mut dst_inner = [ UWORD :: from ( 0u8 ) ; MAX_VALUE_BYTES / mem:: size_of :: < UWORD > ( ) ] ;
314+ let mut src_inner = [ UWORD :: from ( 0u8 ) ; MAX_VALUE_BYTES / mem:: size_of :: < UWORD > ( ) ] ;
314315
315316 let mut src_bytes = self . inner ;
316317 // See below block comment on the write frame for justification of this
@@ -322,7 +323,7 @@ impl FlatValue {
322323 MAX_VALUE_BYTES ,
323324 ) ;
324325 for us in & mut src_inner {
325- * us = usize :: from_be ( us. swap_bytes ( ) ) ;
326+ * us = UWORD :: from_be ( us. swap_bytes ( ) ) ;
326327 }
327328
328329 let src_read_frame = CFrameItem :: new_read ( self . len_bits , src_inner. as_ptr ( ) ) ;
You can’t perform that action at this time.
0 commit comments