wetutil 0.4.1

One-stop crate for all the rust features that I'm missing
/// Generate a debug implementation from the type name.
///
/// Examples:
/// ```
/// # use wetutil::impl_gen::debug::from_type_name;
/// struct MyType;
///
/// from_type_name!(MyType);
///
/// assert_eq!("MyType", format!("{:?}", MyType).as_str());
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "type-name")))]
macro_rules! from_type_name {
	($type:ty$(,)?) => {
		impl ::core::fmt::Debug for $type {
			fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
				f.write_str(&$crate::pretty_type_name_alloc::pretty_type_name::<Self>())
			}
		}
	};
}

pub use from_type_name;