File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,11 @@ async fn mainloop(
83
83
} ;
84
84
85
85
let mut input = token. serialize( ) ;
86
- input. extend_from_slice ( msg. as_bytes ( ) ) ;
87
- input. push( b '\n') ;
86
+ input. push_str ( & msg) ;
87
+ input. push( '\n' ) ;
88
88
89
- if let Err ( err) = stdin. write_all( & input) . await {
89
+ debug!( "Sending {}" , input) ;
90
+ if let Err ( err) = stdin. write_all( & input. as_bytes( ) ) . await {
90
91
error!( "Failed to write, stopping: {}" , err) ;
91
92
break ;
92
93
}
Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ impl Token {
198
198
Self ( rand:: thread_rng ( ) . gen ( ) )
199
199
}
200
200
201
- pub ( crate ) fn serialize ( & self ) -> Vec < u8 > {
202
- format ! ( "{}" , self . 0 ) . into_bytes ( )
201
+ pub ( crate ) fn serialize ( & self ) -> String {
202
+ format ! ( "{}" , self . 0 )
203
203
}
204
204
}
205
205
You can’t perform that action at this time.
0 commit comments