#![doc(html_root_url = "https://docs.rs/compress-lib")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![cfg_attr(
not(test),
deny(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::todo,
clippy::unimplemented,
clippy::unreachable,
clippy::dbg_macro
)
)]
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[cfg(test)]
mod tests {
use super::VERSION;
#[test]
fn test_version_matches_manifest() {
assert_eq!(VERSION, env!("CARGO_PKG_VERSION"));
let core = VERSION.split(['-', '+']).next().unwrap_or_default();
assert_eq!(core.split('.').count(), 3);
assert!(core.split('.').all(|part| part.parse::<u64>().is_ok()));
}
}