File tree 3 files changed +5
-5
lines changed 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -196,8 +196,8 @@ impl Codec for LineCodec {
196
196
let mut encoded_request_id = [ 0 ; 4 ] ;
197
197
BigEndian :: write_u32 ( & mut encoded_request_id, request_id as u32 ) ;
198
198
199
- buf. extend_from_slice ( & encoded_request_id) ;
200
- buf. extend_from_slice ( msg. as_bytes ( ) ) ;
199
+ buf. extend ( & encoded_request_id) ;
200
+ buf. extend ( msg. as_bytes ( ) ) ;
201
201
buf. push ( b'\n' ) ;
202
202
203
203
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ impl Codec for LineCodec {
196
196
}
197
197
198
198
fn encode ( & mut self , msg : String , buf : & mut Vec < u8 > ) -> io:: Result < ( ) > {
199
- buf. extend_from_slice ( msg. as_bytes ( ) ) ;
199
+ buf. extend ( msg. as_bytes ( ) ) ;
200
200
buf. push ( b'\n' ) ;
201
201
202
202
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -304,11 +304,11 @@ impl Codec for LineCodec {
304
304
// streaming body is an empty string.
305
305
assert ! ( message. is_empty( ) == body) ;
306
306
307
- buf. extend_from_slice ( message. as_bytes ( ) ) ;
307
+ buf. extend ( message. as_bytes ( ) ) ;
308
308
}
309
309
Frame :: Body { chunk } => {
310
310
if let Some ( chunk) = chunk {
311
- buf. extend_from_slice ( chunk. as_bytes ( ) ) ;
311
+ buf. extend ( chunk. as_bytes ( ) ) ;
312
312
}
313
313
}
314
314
Frame :: Error { error } => {
You can’t perform that action at this time.
0 commit comments