#[macro_export]
#[cfg(feature = "debug-print")]
macro_rules! debug_print {
($( $args:expr ),*) => { tracing::debug!( $( $args ),* ); }
}
#[macro_export]
#[cfg(not(feature = "debug-print"))]
macro_rules! debug_print {
($( $args:expr ),*) => {
true;
};
}
#[cfg(all(test, feature = "sync"))]
pub trait StreamShim<T> {
fn try_next(&mut self) -> Result<Option<T>, crate::DbErr>;
}
#[cfg(all(test, feature = "sync"))]
impl<I, T> StreamShim<T> for I
where
I: Iterator<Item = Result<T, crate::DbErr>>,
{
fn try_next(&mut self) -> Result<Option<T>, crate::DbErr> {
self.next().transpose()
}
}