feat: uformat macro wrapping ufmt::uwrite

This commit is contained in:
DarkCat09 2025-01-09 19:16:36 +04:00
parent a067515b25
commit 51a991314b
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82
2 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,7 @@
//!
mod hifitime_serde;
pub mod uformat;
use phf::phf_map;
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
}};
}