feat: uformat macro wrapping ufmt::uwrite
This commit is contained in:
parent
a067515b25
commit
51a991314b
2 changed files with 9 additions and 0 deletions
|
@ -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
8
src/utils/uformat.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
#[macro_export]
|
||||
macro_rules! uformat {
|
||||
($($arg:tt)*) => {{
|
||||
let mut buf = String::new();
|
||||
ufmt::uwrite!(&mut buf, $($arg)*).unwrap();
|
||||
buf
|
||||
}};
|
||||
}
|
Loading…
Add table
Reference in a new issue