From 32a944ceef987384207b2d076212c3375c0ee3e5 Mon Sep 17 00:00:00 2001 From: Zack Slayton Date: Thu, 18 Apr 2024 16:38:48 -0500 Subject: [PATCH] cleanup --- src/lazy/encoder/writer.rs | 10 +++++----- tests/ion_tests/mod.rs | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lazy/encoder/writer.rs b/src/lazy/encoder/writer.rs index 7046d8fe8..3934e2083 100644 --- a/src/lazy/encoder/writer.rs +++ b/src/lazy/encoder/writer.rs @@ -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, @@ -502,6 +499,10 @@ impl ElementWriter for ApplicationWriter { #[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::::new(vec![])?; @@ -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(()) } } diff --git a/tests/ion_tests/mod.rs b/tests/ion_tests/mod.rs index 9a13c339b..fefd055fc 100644 --- a/tests/ion_tests/mod.rs +++ b/tests/ion_tests/mod.rs @@ -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]