Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton committed Apr 18, 2024
1 parent 7bdcaad commit 32a944c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/lazy/encoder/writer.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
use std::fs::File;
use std::io::Write;

use delegate::delegate;
use ice_code::ice as cold_path;

use crate::constants::v1_0::system_symbol_ids;
use crate::lazy::encoder::annotate::Annotatable;
use crate::lazy::encoder::annotation_seq::AnnotationSeq;
use crate::lazy::encoder::value_writer::internal::{FieldEncoder, MakeValueWriter};
use crate::lazy::encoder::value_writer::{
AnnotatableWriter, EExpWriter, SequenceWriter, StructWriter, ValueWriter,
};
use crate::lazy::encoder::{LazyEncoder, LazyRawWriter, SymbolCreationPolicy};
use crate::lazy::encoding::{BinaryEncoding_1_0, Encoding};
use crate::lazy::encoding::Encoding;
use crate::lazy::text::raw::v1_1::reader::MacroIdRef;
use crate::raw_symbol_token_ref::AsRawSymbolTokenRef;
use crate::result::IonFailure;
use crate::symbol_ref::AsSymbolRef;
use crate::{
Decimal, Element, ElementWriter, Int, IonResult, IonType, RawSymbolTokenRef, Symbol, SymbolId,
SymbolTable, Timestamp, Value, WriteConfig,
Expand Down Expand Up @@ -502,6 +499,10 @@ impl<E: LazyEncoder, O: Write> ElementWriter for ApplicationWriter<E, O> {
#[cfg(test)]
mod tests {
use super::*;
use crate::lazy::encoder::annotate::Annotatable;
use crate::lazy::encoding::BinaryEncoding_1_0;
use crate::symbol_ref::AsSymbolRef;

#[test]
fn write_element() -> IonResult<()> {
let mut writer = ApplicationWriter::<BinaryEncoding_1_0, _>::new(vec![])?;
Expand Down Expand Up @@ -534,7 +535,6 @@ mod tests {
Element::read_all(output.as_slice())?
.iter()
.for_each(|e| println!("{e}"));
File::create("/tmp/test.out")?.write_all(output.as_slice())?;
Ok(())
}
}
12 changes: 6 additions & 6 deletions tests/ion_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#![cfg(feature = "experimental-writer")]
#![allow(dead_code)]

use ion_rs::{
BinaryWriterBuilder, Element, ElementReader, ElementWriter, Format, IonData, IonError,
IonResult, IonWriter, SExp, Sequence, Symbol, TextKind, TextWriterBuilder, Value, WriteConfig,
};
use std::fs::read;
use std::path::MAIN_SEPARATOR as PATH_SEPARATOR;

use ion_rs::lazy::encoder::value_writer::SequenceWriter;
use ion_rs::lazy::encoder::writer::ApplicationWriter;
use ion_rs::lazy::encoding::{BinaryEncoding_1_0, TextEncoding_1_0};
use std::fs::read;
use std::path::MAIN_SEPARATOR as PATH_SEPARATOR;
use ion_rs::{
Element, ElementReader, ElementWriter, Format, IonData, IonError, IonResult, SExp, Sequence,
Symbol, Value, WriteConfig,
};

/// Concatenates two slices of string slices together.
#[inline]
Expand Down

0 comments on commit 32a944c

Please sign in to comment.