mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-08 03:49:26 +00:00
23 lines
728 B
Rust
23 lines
728 B
Rust
|
//! General `const`ants and `static`s.
|
||
|
//!
|
||
|
//! `#[no_std]` compatible.
|
||
|
|
||
|
//---------------------------------------------------------------------------------------------------- Use
|
||
|
/// The current commit hash of the root Cuprate repository.
|
||
|
///
|
||
|
/// # Case & length
|
||
|
/// It is guaranteed that `COMMIT` will be:
|
||
|
/// - Lowercase
|
||
|
/// - 40 characters long (no newline)
|
||
|
///
|
||
|
/// ```rust
|
||
|
/// # use cuprate_helper::constants::*;
|
||
|
/// assert_eq!(COMMIT.as_bytes().len(), 40);
|
||
|
/// assert_eq!(COMMIT.to_lowercase(), COMMIT);
|
||
|
/// ```
|
||
|
pub const COMMIT: &str = core::env!("COMMIT"); // Set in `helper/build.rs`.
|
||
|
|
||
|
//---------------------------------------------------------------------------------------------------- Tests
|
||
|
#[cfg(test)]
|
||
|
mod test {}
|