From fcd53682a3afafddd4204cacb0584681d2ebff7c Mon Sep 17 00:00:00 2001 From: Zack Slayton Date: Mon, 9 Dec 2024 13:29:00 -0500 Subject: [PATCH] cleanup --- src/lazy/expanded/sequence.rs | 25 ++----------------------- src/lazy/system_reader.rs | 2 +- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/lazy/expanded/sequence.rs b/src/lazy/expanded/sequence.rs index 79c2306e..5ea01ff6 100644 --- a/src/lazy/expanded/sequence.rs +++ b/src/lazy/expanded/sequence.rs @@ -331,7 +331,7 @@ fn expand_next_sequence_value<'top, D: Decoder>( expand_next_sequence_value_from_resolved(evaluator, &mut resolving_iter) } -pub(crate) fn expand_next_sequence_value_from_resolved<'top, D: Decoder>( +fn expand_next_sequence_value_from_resolved<'top, D: Decoder>( evaluator: &mut MacroEvaluator<'top, D>, iter: &mut impl Iterator>>, ) -> Option>> { @@ -360,7 +360,7 @@ pub(crate) fn expand_next_sequence_value_from_resolved<'top, D: Decoder>( } /// Represents a sequence (list or sexp) whose contents are being traversed. -/// This is used in (e.g.) `make_sexp` to store an iterator for each of its +/// This is used in `flatten` to store an iterator for each of its /// sequence arguments in turn. #[derive(Debug)] pub enum ExpandedSequenceIterator<'top, D: Decoder> { @@ -379,24 +379,3 @@ impl<'top, D: Decoder> Iterator for ExpandedSequenceIterator<'top, D> { } } } - -/// Represents a sequence (list or sexp) whose contents are being traversed. -/// This is used in (e.g.) `make_sexp` to store an iterator for each of its -/// sequence arguments in turn. -#[derive(Debug)] -pub enum FlattenedSequence<'top, D: Decoder> { - List(&'top mut ExpandedListIterator<'top, D>), - SExp(&'top mut ExpandedSExpIterator<'top, D>), -} - -impl<'top, D: Decoder> Iterator for FlattenedSequence<'top, D> { - type Item = IonResult>; - - fn next(&mut self) -> Option { - use FlattenedSequence::*; - match self { - List(l) => l.next(), - SExp(s) => s.next(), - } - } -} diff --git a/src/lazy/system_reader.rs b/src/lazy/system_reader.rs index ecb3285a..ebbba7de 100644 --- a/src/lazy/system_reader.rs +++ b/src/lazy/system_reader.rs @@ -686,7 +686,7 @@ mod tests { use crate::lazy::decoder::RawVersionMarker; use crate::lazy::system_stream_item::SystemStreamItem; use crate::{ - v1_0, v1_1, AnyEncoding, Catalog, IonResult, SequenceWriter, SymbolRef, ValueWriter, Writer, + v1_0, AnyEncoding, Catalog, IonResult, SequenceWriter, SymbolRef, ValueWriter, Writer, }; use super::*;