File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -481,30 +481,6 @@ impl BufInsertFormatted {
481481 std:: future:: poll_fn ( |cx| self . poll_write_inner ( data, cx) ) . await
482482 }
483483
484- /// Write all of `data` to the connection, flushing the buffer when it becomes full.
485- ///
486- /// # Not Cancel-Safe
487- /// This method is not cancel-safe because data may be partially written to the connection
488- /// between yield points.
489- #[ inline( always) ]
490- pub async fn write_all ( & mut self , mut data : & [ u8 ] ) -> Result < ( ) > {
491- std:: future:: poll_fn ( |cx| {
492- while !data. is_empty ( ) {
493- let written = ready ! ( self . poll_write_inner( data, cx) ) ?;
494-
495- debug_assert_ne ! (
496- written, 0 ,
497- "BUG: `poll_write_inner` should never return a zero write"
498- ) ;
499-
500- data = & data[ written..] ;
501- }
502-
503- Poll :: Ready ( Ok ( ( ) ) )
504- } )
505- . await
506- }
507-
508484 // `poll_write` but it returns `crate::Result` instead of `io::Result`
509485 #[ inline( always) ]
510486 fn poll_write_inner ( & mut self , data : & [ u8 ] , cx : & mut Context < ' _ > ) -> Poll < Result < usize > > {
You can’t perform that action at this time.
0 commit comments