//! Definitions used by multiple components of omry-cli.

/// Type of record ID in the Omry database.
pub type RecordId = i64;

/// Sets insta's snapshot suffix.
///
/// Taken from <https://insta.rs/docs/patterns/>
#[cfg(test)]
#[macro_export]
macro_rules! set_snapshot_suffix {
        ($($expr:expr),*) => {
            let mut settings = insta::Settings::clone_current();
            settings.set_snapshot_suffix(format!($($expr,)*));
            let _guard = settings.bind_to_scope();
        }
    }

/// Version of `omry-cli`.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
