@@ -207,7 +207,7 @@ impl NinaConcreteParam for NinaByteParam {
207207
208208 fn from_bytes ( bytes : & [ u8 ] ) -> Self {
209209 let mut data_as_bytes: Vec < u8 , 1 > = Vec :: new ( ) ;
210- data_as_bytes. extend_from_slice ( bytes) . ok ( ) . unwrap ( ) ;
210+ data_as_bytes. extend_from_slice ( bytes) . unwrap_or_default ( ) ;
211211 Self {
212212 length : data_as_bytes. len ( ) as u8 ,
213213 data : data_as_bytes,
@@ -240,7 +240,7 @@ impl NinaConcreteParam for NinaWordParam {
240240
241241 fn from_bytes ( bytes : & [ u8 ] ) -> Self {
242242 let mut data_as_bytes: Vec < u8 , 2 > = Vec :: new ( ) ;
243- data_as_bytes. extend_from_slice ( bytes) . ok ( ) . unwrap ( ) ;
243+ data_as_bytes. extend_from_slice ( bytes) . unwrap_or_default ( ) ;
244244 Self {
245245 length : data_as_bytes. len ( ) as u8 ,
246246 data : data_as_bytes,
@@ -273,7 +273,7 @@ impl NinaConcreteParam for NinaSmallArrayParam {
273273
274274 fn from_bytes ( bytes : & [ u8 ] ) -> Self {
275275 let mut data_as_bytes: Vec < u8 , MAX_NINA_PARAM_LENGTH > = Vec :: new ( ) ;
276- data_as_bytes. extend_from_slice ( bytes) . ok ( ) . unwrap ( ) ;
276+ data_as_bytes. extend_from_slice ( bytes) . unwrap_or_default ( ) ;
277277 Self {
278278 length : data_as_bytes. len ( ) as u8 ,
279279 data : data_as_bytes,
@@ -306,7 +306,7 @@ impl NinaConcreteParam for NinaLargeArrayParam {
306306
307307 fn from_bytes ( bytes : & [ u8 ] ) -> Self {
308308 let mut data_as_bytes: Vec < u8 , MAX_NINA_PARAM_LENGTH > = Vec :: new ( ) ;
309- data_as_bytes. extend_from_slice ( bytes) . ok ( ) . unwrap ( ) ;
309+ data_as_bytes. extend_from_slice ( bytes) . unwrap_or_default ( ) ;
310310 Self {
311311 length : data_as_bytes. len ( ) as u16 ,
312312 data : data_as_bytes,
0 commit comments