@@ -13,11 +13,6 @@ use write_vectored::WriteVectoredFuture;
1313use crate :: io:: { self , IoSlice } ;
1414
1515extension_trait ! {
16- use std:: pin:: Pin ;
17- use std:: ops:: { Deref , DerefMut } ;
18-
19- use crate :: task:: { Context , Poll } ;
20-
2116 #[ doc = r#"
2217 Allows writing to a byte stream.
2318
@@ -245,80 +240,4 @@ extension_trait! {
245240 WriteFmtFuture { writer: self , res: Some ( res) , buffer: None , amt: 0 }
246241 }
247242 }
248-
249- impl <T : Write + Unpin + ?Sized > Write for Box <T > {
250- fn poll_write(
251- self : Pin <& mut Self >,
252- cx: & mut Context <' _>,
253- buf: & [ u8 ] ,
254- ) -> Poll <io:: Result <usize >> {
255- unreachable!( "this impl only appears in the rendered docs" )
256- }
257-
258- fn poll_flush( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
259- unreachable!( "this impl only appears in the rendered docs" )
260- }
261-
262- fn poll_close( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
263- unreachable!( "this impl only appears in the rendered docs" )
264- }
265- }
266-
267- impl <T : Write + Unpin + ?Sized > Write for & mut T {
268- fn poll_write(
269- self : Pin <& mut Self >,
270- cx: & mut Context <' _>,
271- buf: & [ u8 ] ,
272- ) -> Poll <io:: Result <usize >> {
273- unreachable!( "this impl only appears in the rendered docs" )
274- }
275-
276- fn poll_flush( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
277- unreachable!( "this impl only appears in the rendered docs" )
278- }
279-
280- fn poll_close( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
281- unreachable!( "this impl only appears in the rendered docs" )
282- }
283- }
284-
285- impl <P > Write for Pin <P >
286- where
287- P : DerefMut + Unpin ,
288- <P as Deref >:: Target : Write ,
289- {
290- fn poll_write(
291- self : Pin <& mut Self >,
292- cx: & mut Context <' _>,
293- buf: & [ u8 ] ,
294- ) -> Poll <io:: Result <usize >> {
295- unreachable!( "this impl only appears in the rendered docs" )
296- }
297-
298- fn poll_flush( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
299- unreachable!( "this impl only appears in the rendered docs" )
300- }
301-
302- fn poll_close( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
303- unreachable!( "this impl only appears in the rendered docs" )
304- }
305- }
306-
307- impl Write for Vec <u8 > {
308- fn poll_write(
309- self : Pin <& mut Self >,
310- cx: & mut Context <' _>,
311- buf: & [ u8 ] ,
312- ) -> Poll <io:: Result <usize >> {
313- unreachable!( "this impl only appears in the rendered docs" )
314- }
315-
316- fn poll_flush( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
317- unreachable!( "this impl only appears in the rendered docs" )
318- }
319-
320- fn poll_close( self : Pin <& mut Self >, cx: & mut Context <' _>) -> Poll <io:: Result <( ) >> {
321- unreachable!( "this impl only appears in the rendered docs" )
322- }
323- }
324243}
0 commit comments