@@ -207,7 +207,7 @@ impl NinaConcreteParam for NinaByteParam {
207
207
208
208
fn from_bytes ( bytes : & [ u8 ] ) -> Self {
209
209
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 ( ) ;
211
211
Self {
212
212
length : data_as_bytes. len ( ) as u8 ,
213
213
data : data_as_bytes,
@@ -240,7 +240,7 @@ impl NinaConcreteParam for NinaWordParam {
240
240
241
241
fn from_bytes ( bytes : & [ u8 ] ) -> Self {
242
242
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 ( ) ;
244
244
Self {
245
245
length : data_as_bytes. len ( ) as u8 ,
246
246
data : data_as_bytes,
@@ -273,7 +273,7 @@ impl NinaConcreteParam for NinaSmallArrayParam {
273
273
274
274
fn from_bytes ( bytes : & [ u8 ] ) -> Self {
275
275
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 ( ) ;
277
277
Self {
278
278
length : data_as_bytes. len ( ) as u8 ,
279
279
data : data_as_bytes,
@@ -306,7 +306,7 @@ impl NinaConcreteParam for NinaLargeArrayParam {
306
306
307
307
fn from_bytes ( bytes : & [ u8 ] ) -> Self {
308
308
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 ( ) ;
310
310
Self {
311
311
length : data_as_bytes. len ( ) as u16 ,
312
312
data : data_as_bytes,
0 commit comments