thot_core/
common.rs

1//! Common use functions.
2use crate::constants::*;
3use std::path::PathBuf;
4
5/// Creates a root drive id with the given metalevel.
6/// Has the form `ROOT_DRIVE_ID[metalevel]:`.
7pub fn root_drive_with_metalevel(metalevel: usize) -> PathBuf {
8    let root_drive = format!("{ROOT_DRIVE_ID}[{metalevel}]:");
9    PathBuf::from(root_drive)
10}
11
12#[cfg(test)]
13#[path = "./common_test.rs"]
14mod common_test;