@@ -163,12 +163,6 @@ impl Read for &[u8] {
163
163
}
164
164
}
165
165
166
- #[ cfg( feature = "std" ) ]
167
- impl < R : std:: io:: Read > Read for std:: io:: BufReader < R > {
168
- #[ inline]
169
- fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize > { Ok ( std:: io:: Read :: read ( self , buf) ?) }
170
- }
171
-
172
166
impl BufRead for & [ u8 ] {
173
167
#[ inline]
174
168
fn fill_buf ( & mut self ) -> Result < & [ u8 ] > { Ok ( self ) }
@@ -178,15 +172,6 @@ impl BufRead for &[u8] {
178
172
fn consume ( & mut self , amount : usize ) { * self = & self [ amount..] }
179
173
}
180
174
181
- #[ cfg( feature = "std" ) ]
182
- impl < R : std:: io:: Read > BufRead for std:: io:: BufReader < R > {
183
- #[ inline]
184
- fn fill_buf ( & mut self ) -> Result < & [ u8 ] > { Ok ( std:: io:: BufRead :: fill_buf ( self ) ?) }
185
-
186
- #[ inline]
187
- fn consume ( & mut self , amount : usize ) { std:: io:: BufRead :: consume ( self , amount) }
188
- }
189
-
190
175
/// Wraps an in memory reader providing the `position` function.
191
176
pub struct Cursor < T > {
192
177
inner : T ,
@@ -301,15 +286,6 @@ impl<'a> Write for &'a mut [u8] {
301
286
fn flush ( & mut self ) -> Result < ( ) > { Ok ( ( ) ) }
302
287
}
303
288
304
- #[ cfg( feature = "std" ) ]
305
- impl < W : std:: io:: Write > Write for std:: io:: BufWriter < W > {
306
- #[ inline]
307
- fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize > { Ok ( std:: io:: Write :: write ( self , buf) ?) }
308
-
309
- #[ inline]
310
- fn flush ( & mut self ) -> Result < ( ) > { Ok ( std:: io:: Write :: flush ( self ) ?) }
311
- }
312
-
313
289
/// A sink to which all writes succeed. See [`std::io::Sink`] for more info.
314
290
///
315
291
/// Created using `io::sink()`.
@@ -326,18 +302,6 @@ impl Write for Sink {
326
302
fn flush ( & mut self ) -> Result < ( ) > { Ok ( ( ) ) }
327
303
}
328
304
329
- #[ cfg( feature = "std" ) ]
330
- impl std:: io:: Write for Sink {
331
- #[ inline]
332
- fn write ( & mut self , buf : & [ u8 ] ) -> std:: io:: Result < usize > { Ok ( buf. len ( ) ) }
333
-
334
- #[ inline]
335
- fn write_all ( & mut self , _: & [ u8 ] ) -> std:: io:: Result < ( ) > { Ok ( ( ) ) }
336
-
337
- #[ inline]
338
- fn flush ( & mut self ) -> std:: io:: Result < ( ) > { Ok ( ( ) ) }
339
- }
340
-
341
305
/// Returns a sink to which all writes succeed. See [`std::io::sink`] for more info.
342
306
#[ inline]
343
307
pub fn sink ( ) -> Sink { Sink }
0 commit comments