@@ -232,15 +232,14 @@ where
232232 ) -> core:: result:: Result < Self , DekuError > {
233233 let Limit :: Count ( count) = limit else {
234234 return Err ( DekuError :: Assertion (
235- "Only count implemented for heapless::Vec" . into ( ) ,
235+ "Only count implemented for heapless::Vec" ,
236236 ) ) ;
237237 } ;
238238
239239 let mut v = heapless:: Vec :: new ( ) ;
240240 for _ in 0 ..count {
241- v. push ( T :: from_reader_with_ctx ( reader, ctx) ?) . map_err ( |_| {
242- DekuError :: InvalidParam ( "Too many elements" . into ( ) )
243- } ) ?
241+ v. push ( T :: from_reader_with_ctx ( reader, ctx) ?)
242+ . map_err ( |_| DekuError :: InvalidParam ( "Too many elements" ) ) ?
244243 }
245244
246245 Ok ( VecWrap ( v) )
@@ -338,15 +337,14 @@ where
338337 ) -> core:: result:: Result < Self , DekuError > {
339338 let Limit :: Count ( count) = limit else {
340339 return Err ( DekuError :: Assertion (
341- "Only count implemented for heapless::Vec" . into ( ) ,
340+ "Only count implemented for heapless::Vec" ,
342341 ) ) ;
343342 } ;
344343
345344 let mut v = heapless:: Vec :: new ( ) ;
346345 for _ in 0 ..count {
347- v. push ( u8:: from_reader_with_ctx ( reader, ( ) ) ?) . map_err ( |_| {
348- DekuError :: InvalidParam ( "Too many elements" . into ( ) )
349- } ) ?
346+ v. push ( u8:: from_reader_with_ctx ( reader, ( ) ) ?)
347+ . map_err ( |_| DekuError :: InvalidParam ( "Too many elements" ) ) ?
350348 }
351349
352350 Ok ( AsciiString ( VecWrap ( v) ) )
0 commit comments