feat: макрос uformat #21

Merged
DarkCat09 merged 2 commits from uformat into master 2025-01-10 16:20:30 +03:00
2 changed files with 9 additions and 0 deletions
Showing only changes of commit 51a991314b - Show all commits

View file

@ -2,6 +2,7 @@
//! //!
mod hifitime_serde; mod hifitime_serde;
pub mod uformat;
use phf::phf_map; use phf::phf_map;
use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde::{Deserialize, Deserializer, Serialize, Serializer};

8
src/utils/uformat.rs Normal file
View file

@ -0,0 +1,8 @@
#[macro_export]
macro_rules! uformat {
($($arg:tt)*) => {{
let mut buf = String::new();
ufmt::uwrite!(&mut buf, $($arg)*).unwrap();
buf
}};
}