blob: 04ab8e177fc17503d23a04dc1e7d82a116373319 [file] [log] [blame]
//!
//! Implementation's internal macros
macro_rules! debug_fmt_fields {
($tyname:ident, $($($field:ident).+),*) => {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(stringify!($tyname))
$(
.field(stringify!($($field).+), &self.$($field).+)
)*
.finish()
}
}
}
macro_rules! clone_fields {
($($field:ident),*) => {
fn clone(&self) -> Self {
Self {
$($field: self.$field.clone(),)*
}
}
}
}