From 12741c1d0e8b0801f6dfb5963efabef069236ffd Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 8 Dec 2020 17:40:11 +0100 Subject: openpgp: Tweak the assert_send_and_sync macro. - Declare trait bounds using a where clause. It looks a bit odd if there is no bound, but not worse than before. --- openpgp/src/macros.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'openpgp/src/macros.rs') diff --git a/openpgp/src/macros.rs b/openpgp/src/macros.rs index 7810a69b..d350a09b 100644 --- a/openpgp/src/macros.rs +++ b/openpgp/src/macros.rs @@ -145,7 +145,7 @@ macro_rules! time_it { /// ``` /// macro_rules! assert_send_and_sync { - ( $x:ty, $( $g:ident$( : $b:path )? $(,)?)*) => { + ( $x:ty where $( $g:ident$( : $b:path )? $(,)?)*) => { impl<$( $g ),*> crate::types::Sendable for $x where $( $g: Send + Sync $(+ $b)? ),* {} @@ -158,4 +158,3 @@ macro_rules! assert_send_and_sync { impl crate::types::Syncable for $x {} }; } - -- cgit v1.2.3