web: update implement_email macro to handle repetition
This commit is contained in:
parent
3a5ca74d71
commit
7cac81cddb
@ -1002,7 +1002,7 @@ impl<T: Email> Email for &'_ T {
|
||||
}
|
||||
|
||||
macro_rules! implement_email {
|
||||
( $t:ty ) => {
|
||||
( $($t:ty),+ ) => {$(
|
||||
impl Email for $t {
|
||||
fn name(&self) -> Option<&str> {
|
||||
self.name.as_deref()
|
||||
@ -1011,11 +1011,14 @@ macro_rules! implement_email {
|
||||
self.addr.as_deref()
|
||||
}
|
||||
}
|
||||
};
|
||||
)+};
|
||||
}
|
||||
implement_email!(ShowThreadQueryThreadMessagesTo);
|
||||
implement_email!(ShowThreadQueryThreadMessagesCc);
|
||||
implement_email!(ShowThreadQueryThreadMessagesFrom);
|
||||
|
||||
implement_email!(
|
||||
ShowThreadQueryThreadMessagesTo,
|
||||
ShowThreadQueryThreadMessagesCc,
|
||||
ShowThreadQueryThreadMessagesFrom
|
||||
);
|
||||
|
||||
fn view_address(email: impl Email) -> Node<Msg> {
|
||||
span![
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user