refactor: move traits to sync module and update imports

This commit is contained in:
Callum Leslie 2026-03-04 20:58:17 +00:00
parent 72b87fd6e0
commit 8366421ede
7 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use crate::error::Error;
use crate::traits::{ChannelReceiver, ChannelSender};
use crate::sync::traits::{ChannelReceiver, ChannelSender};
use crate::types::{ChannelState, Request, Response, ValueSource};
/// The consumer side of the channel that requests values

View file

@ -6,8 +6,6 @@ pub mod async_channel;
#[cfg(feature = "sync")]
pub mod channel;
pub mod error;
#[cfg(feature = "sync")]
pub mod traits;
#[cfg(feature = "async")]
pub mod asynchronous;

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
#[cfg(feature = "sync-crossbeam")]
use crate::traits::{ChannelError, ChannelReceiver, ChannelSender, ChannelType};
use crate::sync::traits::{ChannelError, ChannelReceiver, ChannelSender, ChannelType};
use crate::types;
use arc_swap::ArcSwap;
use crossbeam_channel;

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
#[cfg(feature = "sync-flume")]
use crate::traits::{ChannelError, ChannelReceiver, ChannelSender, ChannelType};
use crate::sync::traits::{ChannelError, ChannelReceiver, ChannelSender, ChannelType};
use crate::types;
use arc_swap::ArcSwap;
use flume;

View file

@ -1,3 +1,5 @@
pub mod traits;
#[cfg(feature = "sync-crossbeam")]
pub mod crossbeam;
#[cfg(feature = "sync-flume")]

View file

@ -1,6 +1,6 @@
use arc_swap::ArcSwap;
use crate::traits::{ChannelError, ChannelReceiver, ChannelSender, ChannelType};
use crate::sync::traits::{ChannelError, ChannelReceiver, ChannelSender, ChannelType};
use crate::types;
use std::sync::Arc;
#[cfg(feature = "sync-std")]
@ -77,7 +77,7 @@ impl<T> StdSuck<T> {
mod tests {
use super::*;
use crate::Error;
use crate::traits::ChannelType;
use crate::sync::traits::ChannelType;
use std::thread;
#[derive(Debug)]