Refactoring const construction (#11)
All checks were successful
Release Tagging / release (push) Successful in 32s
Rust Build / Check (push) Successful in 27s
Rust Build / Test Suite (push) Successful in 29s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 28s
Rust Build / build (push) Successful in 26s
Rust Build / Check (pull_request) Successful in 26s
Rust Build / Test Suite (pull_request) Successful in 28s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Clippy (pull_request) Successful in 27s
Rust Build / build (pull_request) Successful in 25s

Reviewed-on: #11
Co-authored-by: kdeng00 <kundeng00@pm.me>
Co-committed-by: kdeng00 <kundeng00@pm.me>
This commit is contained in:
2025-06-12 23:34:09 +00:00
committed by phoenix
parent 7df6fe5821
commit c90f9fb0b4
3 changed files with 38 additions and 7 deletions

View File

@@ -16,9 +16,12 @@ pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL";
pub mod error {
pub const DB_URL: &str = "DATABASE_URL must be set in .env";
pub const SECRET_KEY: &str = "SECRET_KEY must be set in environment file";
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY must not be set in environment file";
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY must not be set in environment file";
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL must not be set in enviornment file";
use const_format::concatcp;
pub const GENERAL_ERROR: &str = "must not be set in enviornment file";
pub const DB_URL: &str = concatcp!(super::DB_URL, " ", GENERAL_ERROR);
pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
pub const SECRET_MAIN_KEY: &str = concatcp!(super::SECRET_MAIN_KEY, " ", GENERAL_ERROR);
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR);
pub const ICARUS_BASE_API_URL: &str = concatcp!(super::ICARUS_BASE_API_URL, " ", GENERAL_ERROR);
}