File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -123,24 +123,14 @@ impl<'a> Message for CopyData<'a> {
123123 }
124124}
125125
126- pub struct CopyDone ;
127-
128- impl Message for CopyDone {
129- fn write ( & self , buf : & mut Vec < u8 > ) -> Result < ( ) , io:: Error > {
130- buf. push ( b'c' ) ;
131- write_body ( buf, |_| Ok ( ( ) ) )
132- }
126+ pub fn copy_done ( buf : & mut Vec < u8 > ) {
127+ buf. push ( b'c' ) ;
128+ write_body ( buf, |_| Ok :: < ( ) , io:: Error > ( ( ) ) ) . unwrap ( ) ;
133129}
134130
135- pub struct CopyFail < ' a > {
136- pub message : & ' a str ,
137- }
138-
139- impl < ' a > Message for CopyFail < ' a > {
140- fn write ( & self , buf : & mut Vec < u8 > ) -> Result < ( ) , io:: Error > {
141- buf. push ( b'f' ) ;
142- write_body ( buf, |buf| buf. write_cstr ( self . message ) )
143- }
131+ pub fn copy_fail ( message : & str , buf : & mut Vec < u8 > ) -> io:: Result < ( ) > {
132+ buf. push ( b'f' ) ;
133+ write_body ( buf, |buf| buf. write_cstr ( message) )
144134}
145135
146136pub struct Describe < ' a > {
You can’t perform that action at this time.
0 commit comments