From a7395d187b73c7549425bf1056a677f5ca2724fa Mon Sep 17 00:00:00 2001 From: yourfriendoss Date: Tue, 9 Sep 2025 11:37:04 +0300 Subject: [PATCH] feat: add R or D to the name depending on how it was built --- src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e99181f..9b5d167 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,6 +65,10 @@ async fn main() -> Result<(), Box> { let s = tokio::fs::read_to_string("config.hocon").await?; let conf: Configuration = hocon::de::from_str(&s)?; + let mut mode = "RELEASE"; + if cfg!(debug_assertions) { + mode = "DEBUG"; + } let (mut client, event_rx) = Client::new(); let pool = PgPoolOptions::new() @@ -116,9 +120,9 @@ async fn main() -> Result<(), Box> { let username = { let ram = ALLOCATOR.allocated() / 1_000_000; if ram != 0 { - format!("{} 📶{} ms 🐏{} mb ", conf.commands.name, t, ram) + format!("{} 📶{} ms 🐏{} mb [{}]", conf.commands.name, t, ram, mode) } else { - format!("{} 📶{} ms", conf.commands.name, -t) + format!("{} 📶{} ms [{}]", conf.commands.name, -t, mode) } };