From 3f469121ef67656f2bf3653f53df50675d85b7c4 Mon Sep 17 00:00:00 2001 From: jonay2000 Date: Thu, 8 Jun 2023 14:26:52 +0200 Subject: [PATCH] move conversions --- src/lib.rs | 3 --- tests/compiletests.rs | 3 +++ {src => tests}/conversions.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename {src => tests}/conversions.rs (96%) 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;