Skip to content

Commit

Permalink
Removes kludge import in integration test (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton authored Feb 12, 2024
1 parent 501638d commit 4ea7b3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ pub mod integration_testing {
use crate::raw_reader::RawReader;
use crate::reader::{Reader, UserReader};

pub use crate::binary::constants::v1_0::IVM;

pub fn new_reader<'a, R: 'a + RawReader>(raw_reader: R) -> Reader<'a> {
UserReader::new(Box::new(raw_reader))
}
Expand Down
6 changes: 3 additions & 3 deletions tests/non_blocking_element_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ impl ElementApi for NonBlockingNativeElementApi {
type ElementReader<'a> = Reader<'a>;

fn make_reader(data: &[u8]) -> IonResult<Self::ElementReader<'_>> {
// These imports are visible as a temporary workaround.
// This import is visible as a temporary workaround.
// See: https://github.com/amazon-ion/ion-rust/issues/484
use ion_rs::integration_testing::{new_reader, IVM};
use ion_rs::integration_testing::new_reader;
// If the data is binary, create a non-blocking binary reader.
if data.starts_with(&IVM) {
if data.starts_with(&[0xE0u8, 0x01, 0x00, 0xEA]) {
let raw_reader = RawBinaryReader::new(data);
Ok(new_reader(raw_reader))
} else {
Expand Down

0 comments on commit 4ea7b3b

Please sign in to comment.