From 3385bb36602deab8fa5981659f6830955219d41c Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 16 Mar 2026 14:03:54 +0100 Subject: [PATCH] feat(utils/format): adding the format_sanction module --- src/utils/format.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/utils/format.rs diff --git a/src/utils/format.rs b/src/utils/format.rs new file mode 100644 index 0000000..00ac718 --- /dev/null +++ b/src/utils/format.rs @@ -0,0 +1,6 @@ +pub fn format_sanction_reason(module_name:&str, reason: Option<&str>, executor: &str) -> String { + match reason { + Some(s) => format!("[TTY {}] {} by {}", module_name, s, executor), + None => format!("[TTY {}] by {}", module_name, executor) + } +}