From d8016b2dad5c8f2f2db1421901e2d276c8556953 Mon Sep 17 00:00:00 2001 From: "Ram.Type-0" Date: Sun, 7 Nov 2021 19:42:13 +0900 Subject: [PATCH] Move AsyncChunkError from rtrb to rtrb::chunks --- src/chunks.rs | 3 +++ src/lib.rs | 2 +- tests/async_operations.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/chunks.rs b/src/chunks.rs index ba29b21..31c8422 100644 --- a/src/chunks.rs +++ b/src/chunks.rs @@ -174,6 +174,9 @@ use core::sync::atomic::Ordering; use crate::{Consumer, CopyToUninit, DummyReactor, Reactor, Producer}; +#[cfg(feature = "async")] +pub use crate::async_rtrb::AsyncChunkError; + // This is used in the documentation. #[allow(unused_imports)] use crate::RingBuffer; diff --git a/src/lib.rs b/src/lib.rs index 6eeebde..50d1001 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,7 +65,7 @@ mod reactor; #[cfg(feature = "async")] mod async_rtrb; #[cfg(feature = "async")] -pub use async_rtrb::{AsyncChunkError,AsyncPushError,AsyncPopError,AsyncPeekError}; +pub use async_rtrb::{AsyncPushError,AsyncPopError,AsyncPeekError}; use reactor::{DummyReactor, Reactor}; // This is used in the documentation. diff --git a/tests/async_operations.rs b/tests/async_operations.rs index ba370e0..dcf4ef7 100644 --- a/tests/async_operations.rs +++ b/tests/async_operations.rs @@ -1,6 +1,6 @@ #![cfg(feature = "async")] use rtrb::RingBuffer; -use rtrb::*; +use rtrb::chunks::AsyncChunkError; #[tokio::test] async fn exceed_capacity(){