impl_macros/alloc_.rs
1//
2#[macro_export]
3macro_rules! impl_partial_eq_str_for_display {
4 ($str:ty, $display:ty) => {
5 #[allow(unused_lifetimes)]
6 impl<'a> ::core::cmp::PartialEq<$str> for $display {
7 fn eq(&self, other: &$str) -> bool {
8 ::core::cmp::PartialEq::eq(&$crate::alloc::format!("{}", self)[..], &other[..])
9 }
10 }
11 };
12}