mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-05 10:29:32 +00:00
e287ea1d84
* helper: add `fs` * fs: docs * remove `cuprate_create_dir_all()` Calling each function is better. * fs: comments * helper: fix `asynch` tokio import for tests * fs: add sanity tests * fs: add `is_absolute()` to tests * fs: assert path is absolute * Update helper/src/fs.rs Co-authored-by: Boog900 <boog900@tutanota.com> * Update helper/src/fs.rs Co-authored-by: Boog900 <boog900@tutanota.com> --------- Co-authored-by: Boog900 <boog900@tutanota.com>
22 lines
731 B
Rust
22 lines
731 B
Rust
//! General `const`ants and `static`s.
|
|
//!
|
|
//! `#[no_std]` compatible.
|
|
|
|
//---------------------------------------------------------------------------------------------------- Commit
|
|
/// 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 {}
|