@@ -497,7 +497,7 @@ impl<'a> BinaryBuffer<'a> {
497497 /// Reads the value for a delimited struct field, consuming NOPs if present.
498498 fn peek_delimited_struct_value (
499499 & self ,
500- ) -> IonResult < ( Option < LazyRawBinaryValue_1_1 < ' a > > , BinaryBuffer < ' a > ) > {
500+ ) -> IonResult < ( Option < LazyRawValueExpr < ' a , v1_1 :: Binary > > , BinaryBuffer < ' a > ) > {
501501 let opcode = self . expect_opcode ( ) ?;
502502 if opcode. is_nop ( ) {
503503 let after_nops = self . consume_nop_padding ( opcode) ?. 1 ;
@@ -507,7 +507,7 @@ impl<'a> BinaryBuffer<'a> {
507507 }
508508 Ok ( ( None , after_nops) )
509509 } else {
510- self . read_value ( opcode ) . map ( | ( v , after ) | ( Some ( v ) , after ) )
510+ self . read_sequence_value_expr ( )
511511 }
512512 }
513513
@@ -547,7 +547,7 @@ impl<'a> BinaryBuffer<'a> {
547547 return IonResult :: incomplete ( "found field name but no value" , after_name. offset ( ) ) ;
548548 }
549549
550- let ( value , after_value) = match after_name. peek_delimited_struct_value ( ) ? {
550+ let ( field , after_value) = match after_name. peek_delimited_struct_value ( ) ? {
551551 ( None , after) => {
552552 if after. is_empty ( ) {
553553 return IonResult :: incomplete (
@@ -558,16 +558,15 @@ impl<'a> BinaryBuffer<'a> {
558558 buffer = after;
559559 continue ; // No value for this field, loop to try next field.
560560 }
561- ( Some ( value) , after) => ( value, after) ,
561+ ( Some ( RawValueExpr :: ValueLiteral ( value) ) , after) => {
562+ ( LazyRawFieldExpr :: NameValue ( field_name, value) , after)
563+ }
564+ ( Some ( RawValueExpr :: EExp ( eexp) ) , after) => {
565+ ( LazyRawFieldExpr :: NameEExp ( field_name, eexp) , after)
566+ }
562567 } ;
563568
564- let allocator = self . context ( ) . allocator ( ) ;
565- let value_ref = & * allocator. alloc_with ( || value) ;
566-
567- return Ok ( (
568- Some ( LazyRawFieldExpr :: NameValue ( field_name, value_ref) ) ,
569- after_value,
570- ) ) ;
569+ return Ok ( ( Some ( field) , after_value) ) ;
571570 }
572571 }
573572
@@ -619,7 +618,7 @@ impl<'a> BinaryBuffer<'a> {
619618 let input = self ;
620619 let header = opcode. to_header ( ) . ok_or_else ( || {
621620 IonError :: decoding_error ( format ! (
622- "found a non-value in value position; buffer=<{:X ?}>" ,
621+ "found a non-value in value position; buffer=<{:02X ?}>" ,
623622 input. bytes_range( 0 , 16 . min( input. bytes( ) . len( ) ) )
624623 ) )
625624 } ) ?;
0 commit comments