File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 33use crate :: { Bufferfish , BufferfishError } ;
44
55/// Types implementing this trait are able to be encoded to a `Bufferfish`.
6- pub trait Encodable {
6+ pub trait Encodable : Sized {
77 /// Encode the type into a given `Bufferfish`.
88 fn encode ( & self , bf : & mut Bufferfish ) -> Result < ( ) , BufferfishError > ;
99
@@ -19,10 +19,7 @@ pub trait Encodable {
1919 ///
2020 /// This is useful when you want to reuse an existing buffer to avoid
2121 /// allocations.
22- fn encode_into ( self , bf : & mut Bufferfish ) -> Result < ( ) , BufferfishError >
23- where
24- Self : Sized ,
25- {
22+ fn encode_into ( self , bf : & mut Bufferfish ) -> Result < ( ) , BufferfishError > {
2623 self . encode ( bf)
2724 }
2825}
Original file line number Diff line number Diff line change @@ -69,8 +69,6 @@ pub fn bufferfish_impl_encodable(input: proc_macro::TokenStream) -> proc_macro::
6969 }
7070
7171 fn encode_into( self , bf: & mut bufferfish:: Bufferfish ) -> Result <( ) , bufferfish:: BufferfishError >
72- where
73- Self : Sized ,
7472 {
7573 #packet_id_snippet
7674 self . encode( bf)
You can’t perform that action at this time.
0 commit comments