@@ -47,7 +47,7 @@ impl<T> TestEq for T {}
47
47
#[ allow( missing_docs) ]
48
48
#[ derive( Debug ) ]
49
49
#[ cfg_attr( test, derive( PartialEq ) ) ]
50
- pub ( crate ) enum Message < T > where T : core:: fmt:: Debug + Type + TestEq {
50
+ pub ( crate ) enum Message < T : core:: fmt:: Debug + Type + TestEq > {
51
51
Init ( msgs:: Init ) ,
52
52
Error ( msgs:: ErrorMessage ) ,
53
53
Warning ( msgs:: WarningMessage ) ,
@@ -105,7 +105,7 @@ pub(crate) enum Message<T> where T: core::fmt::Debug + Type + TestEq {
105
105
Custom ( T ) ,
106
106
}
107
107
108
- impl < T > Writeable for Message < T > where T : core:: fmt:: Debug + Type + TestEq {
108
+ impl < T : core:: fmt:: Debug + Type + TestEq > Writeable for Message < T > {
109
109
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
110
110
match self {
111
111
& Message :: Init ( ref msg) => msg. write ( writer) ,
@@ -164,7 +164,7 @@ impl<T> Writeable for Message<T> where T: core::fmt::Debug + Type + TestEq {
164
164
}
165
165
}
166
166
167
- impl < T > Type for Message < T > where T : core:: fmt:: Debug + Type + TestEq {
167
+ impl < T : core:: fmt:: Debug + Type + TestEq > Type for Message < T > {
168
168
/// Returns the type that was used to decode the message payload.
169
169
fn type_id ( & self ) -> u16 {
170
170
match self {
@@ -224,7 +224,7 @@ impl<T> Type for Message<T> where T: core::fmt::Debug + Type + TestEq {
224
224
}
225
225
}
226
226
227
- impl < T > Message < T > where T : core:: fmt:: Debug + Type + TestEq {
227
+ impl < T : core:: fmt:: Debug + Type + TestEq > Message < T > {
228
228
/// Returns whether the message's type is even, indicating both endpoints must support it.
229
229
pub fn is_even ( & self ) -> bool {
230
230
( self . type_id ( ) & 1 ) == 0
@@ -447,12 +447,12 @@ impl Type for () {
447
447
}
448
448
449
449
#[ cfg( test) ]
450
- impl < T : core:: fmt:: Debug + Writeable + PartialEq > Type for T where T : Encode {
450
+ impl < T : Encode + Writeable + core:: fmt:: Debug + PartialEq > Type for T {
451
451
fn type_id ( & self ) -> u16 { T :: TYPE }
452
452
}
453
453
454
454
#[ cfg( not( test) ) ]
455
- impl < T : core:: fmt:: Debug + Writeable > Type for T where T : Encode {
455
+ impl < T : Encode + core:: fmt:: Debug + Writeable > Type for T {
456
456
fn type_id ( & self ) -> u16 { T :: TYPE }
457
457
}
458
458
0 commit comments