Skip to content

Commit 2f7c2c4

Browse files
committed
Remove stream_len functions entirely.
Most of the `seek_convenience` feature was stablized, but `stream_len` was not [0]. To minimize version incompatibilities here, just remove our `stream_len` functions for now and rely on the defaults. [0]: rust-lang/rust#70904
1 parent d8efe4b commit 2f7c2c4

File tree

4 files changed

+0
-32
lines changed

4 files changed

+0
-32
lines changed

Diff for: cap-async-std/src/fs/file.rs

-4
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ impl Seek for File {
298298
Seek::poll_seek(Pin::new(&mut self.std), cx, pos)
299299
}
300300

301-
// async_std doesn't have `stream_len`.
302-
303301
// async_std doesn't have `seek_convenience`.
304302
}
305303

@@ -309,8 +307,6 @@ impl Seek for &File {
309307
Seek::poll_seek(Pin::new(&mut &self.std), cx, pos)
310308
}
311309

312-
// async_std doesn't have `stream_len`.
313-
314310
// async_std doesn't have `seek_convenience`.
315311
}
316312

Diff for: cap-async-std/src/fs_utf8/file.rs

-4
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ impl Seek for File {
268268
Seek::poll_seek(Pin::new(&mut self.cap_std), cx, pos)
269269
}
270270

271-
// async_std doesn't have `stream_len`.
272-
273271
// async_std doesn't have `stream_position`.
274272
}
275273

@@ -279,8 +277,6 @@ impl Seek for &File {
279277
Seek::poll_seek(Pin::new(&mut &self.cap_std), cx, pos)
280278
}
281279

282-
// async_std doesn't have `stream_len`.
283-
284280
// async_std doesn't have `stream_position`.
285281
}
286282

Diff for: cap-std/src/fs/file.rs

-12
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,6 @@ impl Seek for File {
323323
self.std.seek(pos)
324324
}
325325

326-
#[cfg(seek_convenience)]
327-
#[inline]
328-
fn stream_len(&mut self) -> io::Result<u64> {
329-
self.std.stream_len()
330-
}
331-
332326
#[cfg(seek_convenience)]
333327
#[inline]
334328
fn stream_position(&mut self) -> io::Result<u64> {
@@ -342,12 +336,6 @@ impl Seek for &File {
342336
(&mut &self.std).seek(pos)
343337
}
344338

345-
#[cfg(seek_convenience)]
346-
#[inline]
347-
fn stream_len(&mut self) -> io::Result<u64> {
348-
(&mut &self.std).stream_len()
349-
}
350-
351339
#[cfg(seek_convenience)]
352340
#[inline]
353341
fn stream_position(&mut self) -> io::Result<u64> {

Diff for: cap-std/src/fs_utf8/file.rs

-12
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,6 @@ impl Seek for File {
302302
self.cap_std.seek(pos)
303303
}
304304

305-
#[cfg(seek_convenience)]
306-
#[inline]
307-
fn stream_len(&mut self) -> io::Result<u64> {
308-
self.cap_std.stream_len()
309-
}
310-
311305
#[cfg(seek_convenience)]
312306
#[inline]
313307
fn stream_position(&mut self) -> io::Result<u64> {
@@ -321,12 +315,6 @@ impl Seek for &File {
321315
(&mut &self.cap_std).seek(pos)
322316
}
323317

324-
#[cfg(seek_convenience)]
325-
#[inline]
326-
fn stream_len(&mut self) -> io::Result<u64> {
327-
(&mut &self.cap_std).stream_len()
328-
}
329-
330318
#[cfg(seek_convenience)]
331319
#[inline]
332320
fn stream_position(&mut self) -> io::Result<u64> {

0 commit comments

Comments
 (0)