1#[macro_export]
16#[cfg(feature = "debug-print")]
17macro_rules! debug_print {
18 ($( $args:expr ),*) => { tracing::debug!( $( $args ),* ); }
19}
20
21#[macro_export]
22#[cfg(not(feature = "debug-print"))]
24macro_rules! debug_print {
25 ($( $args:expr ),*) => {
26 true;
27 };
28}
29
30#[cfg(all(test, feature = "sync"))]
31pub trait StreamShim<T> {
32 fn try_next(&mut self) -> Result<Option<T>, crate::DbErr>;
33}
34
35#[cfg(all(test, feature = "sync"))]
36impl<I, T> StreamShim<T> for I
37where
38 I: Iterator<Item = Result<T, crate::DbErr>>,
39{
40 fn try_next(&mut self) -> Result<Option<T>, crate::DbErr> {
41 self.next().transpose()
42 }
43}