@@ -11,7 +11,7 @@ use crate::output::CommandOutput;
1111use anyhow:: { bail, Context , Result } ;
1212use clap:: builder:: ValueParser ;
1313use clap:: { Arg , ArgAction , ArgMatches , Command } ;
14- use ion_rs:: v1_0:: { EncodedBinaryValue , RawValueRef } ;
14+ use ion_rs:: v1_0:: { BinaryValueLiteral , RawValueRef } ;
1515use ion_rs:: * ;
1616use termcolor:: { Color , ColorSpec , WriteColor } ;
1717
@@ -265,8 +265,8 @@ impl<'a, 'b> IonInspector<'a, 'b> {
265265 limit_bytes : usize ,
266266 hide_expansion : bool ,
267267 ) -> IonResult < IonInspector < ' a , ' b > > {
268- let text_writer = WriteConfig :: < v1_0 :: Text > :: new ( TextFormat :: Compact )
269- . build_raw_writer ( Vec :: with_capacity ( TEXT_WRITER_INITIAL_BUFFER_SIZE ) ) ?;
268+ let text_writer =
269+ v1_0 :: RawTextWriter :: new ( Vec :: with_capacity ( TEXT_WRITER_INITIAL_BUFFER_SIZE ) ) ?;
270270 let inspector = IonInspector {
271271 output : out,
272272 bytes_to_skip,
@@ -365,11 +365,11 @@ impl<'a, 'b> IonInspector<'a, 'b> {
365365 }
366366
367367 /// If `maybe_item` is:
368- /// * `Some(entity)`, checks to see if the entity's final byte offset is beyond the configured
369- /// number of bytes to skip.
370- /// * `None`, then there is no stream-level entity backing the item (that is: it was the result
371- /// of a macro expansion). Checks to see if the inspector has already completed its
372- /// skipping phase on an earlier item.
368+ /// * `Some(entity)`, checks to see if the entity's final byte offset is beyond the configured
369+ /// number of bytes to skip.
370+ /// * `None`, then there is no stream-level entity backing the item (that is: it was the result
371+ /// of a macro expansion). Checks to see if the inspector has already completed its
372+ /// skipping phase on an earlier item.
373373 fn should_skip < T : HasRange > ( & mut self , maybe_item : & Option < T > ) -> bool {
374374 match maybe_item {
375375 // If this item came from an input literal, see if the input literal ends after
@@ -382,11 +382,11 @@ impl<'a, 'b> IonInspector<'a, 'b> {
382382 }
383383
384384 /// If `maybe_item` is:
385- /// * `Some(entity)`, checks to see if the entity's final byte offset is beyond the configured
386- /// number of bytes to inspect.
387- /// * `None`, then there is no stream-level entity backing the item. These will always be
388- /// inspected; if the e-expression that produced the value was not beyond the limit,
389- /// none of the ephemeral values it produces are either.
385+ /// * `Some(entity)`, checks to see if the entity's final byte offset is beyond the configured
386+ /// number of bytes to inspect.
387+ /// * `None`, then there is no stream-level entity backing the item. These will always be
388+ /// inspected; if the e-expression that produced the value was not beyond the limit,
389+ /// none of the ephemeral values it produces are either.
390390 fn is_past_limit < T : HasRange > ( & self , maybe_item : & Option < T > ) -> bool {
391391 let limit = self . bytes_to_skip . saturating_add ( self . limit_bytes ) ;
392392 maybe_item
@@ -491,7 +491,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
491491 self . write_comment ( "End of stream" )
492492 }
493493
494- fn inspect_macro_invocation < ' x > (
494+ fn inspect_macro_invocation (
495495 & mut self ,
496496 depth : usize ,
497497 trailing_delimiter : & str ,
@@ -513,7 +513,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
513513 Ok ( ( ) )
514514 }
515515
516- fn inspect_eexp < ' x > (
516+ fn inspect_eexp (
517517 & mut self ,
518518 depth : usize ,
519519 trailing_delimiter : & str ,
@@ -588,7 +588,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
588588 Ok ( ( ) )
589589 }
590590
591- fn inspect_eexp_arg_group < ' x > (
591+ fn inspect_eexp_arg_group (
592592 & mut self ,
593593 depth : usize ,
594594 arg_group : EExpArgGroup < AnyEncoding > ,
@@ -955,7 +955,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
955955 & mut self ,
956956 depth : usize ,
957957 value : LazyValue < ' x , AnyEncoding > ,
958- encoded_value : impl EncodedBinaryValue < ' x , D > ,
958+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
959959 ) -> Result < ( ) > {
960960 if !value. has_annotations ( ) {
961961 return Ok ( ( ) ) ;
@@ -1036,7 +1036,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
10361036 fn inspect_literal_container_header < ' x , D : Decoder > (
10371037 & mut self ,
10381038 depth : usize ,
1039- encoded_value : impl EncodedBinaryValue < ' x , D > ,
1039+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
10401040 ) -> Result < ( ) > {
10411041 let opcode_bytes: & [ u8 ] = encoded_value. value_opcode_span ( ) . bytes ( ) ;
10421042 let mut formatter = BytesFormatter :: new (
@@ -1057,7 +1057,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
10571057 fn inspect_literal_container_footer < ' x , D : Decoder > (
10581058 & mut self ,
10591059 depth : usize ,
1060- encoded_value : impl EncodedBinaryValue < ' x , D > ,
1060+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
10611061 closing_delimiter : & str ,
10621062 trailing_delimiter : & str ,
10631063 ) -> Result < ( ) > {
@@ -1091,7 +1091,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
10911091 depth : usize ,
10921092 delimiter : & str ,
10931093 sexp : LazySExp < ' x , AnyEncoding > ,
1094- encoded_value : impl EncodedBinaryValue < ' x , D > ,
1094+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
10951095 ) -> Result < ( ) > {
10961096 self . inspect_literal_sequence (
10971097 depth,
@@ -1114,7 +1114,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
11141114 closing_delimiter : & str ,
11151115 trailing_delimiter : & str ,
11161116 nested_values : impl IntoIterator < Item = IonResult < ValueExpr < ' x , AnyEncoding > > > ,
1117- encoded_value : impl EncodedBinaryValue < ' x , D > ,
1117+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
11181118 value_comment_fn : impl CommentFn < ' x > ,
11191119 ) -> Result < ( ) > {
11201120 self . inspect_literal_container_header ( depth, encoded_value) ?;
@@ -1305,7 +1305,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
13051305 depth : usize ,
13061306 trailing_delimiter : & str ,
13071307 struct_ : LazyStruct < AnyEncoding > ,
1308- encoded_value : impl EncodedBinaryValue < ' x , D > ,
1308+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
13091309 kind : StructKind ,
13101310 ) -> Result < ( ) > {
13111311 self . inspect_literal_container_header ( depth, encoded_value) ?;
@@ -1421,7 +1421,7 @@ impl<'a, 'b> IonInspector<'a, 'b> {
14211421 depth : usize ,
14221422 delimiter : & str ,
14231423 value : LazyValue < ' x , AnyEncoding > ,
1424- encoded_value : impl EncodedBinaryValue < ' x , D > ,
1424+ encoded_value : impl BinaryValueLiteral < ' x , D > ,
14251425 mut comment_fn : impl CommentFn < ' x > ,
14261426 ) -> Result < ( ) > {
14271427 let range = encoded_value. value_span ( ) . range ( ) ;
0 commit comments