@@ -47,7 +47,7 @@ impl<T> TestEq for T {}
4747#[ allow( missing_docs) ]
4848#[ derive( Debug ) ]
4949#[ 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 > {
5151 Init ( msgs:: Init ) ,
5252 Error ( msgs:: ErrorMessage ) ,
5353 Warning ( msgs:: WarningMessage ) ,
@@ -105,7 +105,7 @@ pub(crate) enum Message<T> where T: core::fmt::Debug + Type + TestEq {
105105 Custom ( T ) ,
106106}
107107
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 > {
109109 fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
110110 match self {
111111 & Message :: Init ( ref msg) => msg. write ( writer) ,
@@ -164,7 +164,7 @@ impl<T> Writeable for Message<T> where T: core::fmt::Debug + Type + TestEq {
164164 }
165165}
166166
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 > {
168168 /// Returns the type that was used to decode the message payload.
169169 fn type_id ( & self ) -> u16 {
170170 match self {
@@ -224,7 +224,7 @@ impl<T> Type for Message<T> where T: core::fmt::Debug + Type + TestEq {
224224 }
225225}
226226
227- impl < T > Message < T > where T : core:: fmt:: Debug + Type + TestEq {
227+ impl < T : core:: fmt:: Debug + Type + TestEq > Message < T > {
228228 /// Returns whether the message's type is even, indicating both endpoints must support it.
229229 pub fn is_even ( & self ) -> bool {
230230 ( self . type_id ( ) & 1 ) == 0
@@ -447,12 +447,12 @@ impl Type for () {
447447}
448448
449449#[ 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 {
451451 fn type_id ( & self ) -> u16 { T :: TYPE }
452452}
453453
454454#[ 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 {
456456 fn type_id ( & self ) -> u16 { T :: TYPE }
457457}
458458
0 commit comments