mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-22 00:00:15 +02:00
Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (#743)
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
macro_rules! fmt_impl {
|
||||
($tr:ident, $ty:ty) => {
|
||||
impl $tr for $ty {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||
$tr::fmt(&BytesRef(self.as_ref()), f)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
mod debug;
|
||||
mod hex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user