File tree Expand file tree Collapse file tree
src/hyperlight_common/src/virtq Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ impl DescTable {
204204 /// - `len` must not exceed `u16::MAX`
205205 /// - memory must remain valid for the lifetime of this table
206206 pub unsafe fn from_raw_parts ( base_addr : u64 , len : usize ) -> Self {
207- assert ! ( base_addr. is_multiple_of( Descriptor :: ALIGN as u64 ) ) ;
208- assert ! ( len <= u16 :: MAX as usize ) ;
207+ debug_assert ! ( base_addr. is_multiple_of( Descriptor :: ALIGN as u64 ) ) ;
208+ debug_assert ! ( len <= u16 :: MAX as usize ) ;
209209
210210 Self { base_addr, len }
211211 }
Original file line number Diff line number Diff line change @@ -1028,7 +1028,7 @@ impl<M: MemOps> RingConsumer<M> {
10281028 // Update inflight count
10291029 self . num_inflight += chain_len as usize ;
10301030
1031- assert ! ( self . num_inflight <= self . desc_table. len( ) ) ;
1031+ debug_assert ! ( self . num_inflight <= self . desc_table. len( ) ) ;
10321032
10331033 Ok ( (
10341034 id,
@@ -1084,7 +1084,7 @@ impl<M: MemOps> RingConsumer<M> {
10841084 self . id_num [ id as usize ] = 0 ;
10851085
10861086 self . num_inflight -= chain_len as usize ;
1087- assert ! ( self . num_inflight <= self . desc_table. len( ) ) ;
1087+ debug_assert ! ( self . num_inflight <= self . desc_table. len( ) ) ;
10881088
10891089 Ok ( ( ) )
10901090 }
You can’t perform that action at this time.
0 commit comments