diff --git a/src/lib.rs b/src/lib.rs index e07e0ba..3d83655 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,9 +79,6 @@ pub use with_alloc::alloc_ringbuffer::AllocRingBuffer; #[cfg(feature = "alloc")] pub use with_alloc::vecdeque::GrowableAllocRingBuffer; -#[cfg(test)] -mod conversions; - mod with_const_generics; pub use with_const_generics::ConstGenericRingBuffer; diff --git a/tests/compiletests.rs b/tests/compiletests.rs index 4fa9e1d..8c3a2a2 100644 --- a/tests/compiletests.rs +++ b/tests/compiletests.rs @@ -2,6 +2,9 @@ extern crate compiletest_rs as compiletest; use std::path::PathBuf; +#[cfg(test)] +mod conversions; + fn run_mode(mode: &'static str) { let mut config = compiletest::Config::default(); diff --git a/src/conversions.rs b/tests/conversions.rs similarity index 96% rename from src/conversions.rs rename to tests/conversions.rs index e1346fe..f77220a 100644 --- a/src/conversions.rs +++ b/tests/conversions.rs @@ -1,7 +1,7 @@ -extern crate std; +extern crate alloc; -use crate::{AllocRingBuffer, ConstGenericRingBuffer, GrowableAllocRingBuffer}; -use crate::{RingBufferExt, RingBufferWrite}; +use ringbuffer::{AllocRingBuffer, ConstGenericRingBuffer, GrowableAllocRingBuffer}; +use ringbuffer::{RingBufferExt, RingBufferWrite}; use alloc::collections::{LinkedList, VecDeque}; use alloc::string::ToString; use core::ops::Deref;