Skip to content

Commit 33a3b26

Browse files
committed
Refer new Seek::stream_pos() in the comment
`reader.stream_pos()` is equivalent to `reader.seek(SeekFrom::Current(0))`. See <rust-lang/rust#59359>.
1 parent 2beacd4 commit 33a3b26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pull_parser/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub trait ParserSource: Sized + io::Read {
3535
/// as possible.
3636
///
3737
/// Reader types with [`std::io::Seek`] can implement this as
38-
/// `self.seek(SeekFrom::Current(0)).unwrap()`, but this is fallible and
38+
/// `self.stream_position().unwrap()`, but this is fallible and
3939
/// can be inefficient.
4040
/// Use of [`PositionCacheReader`] is reccomended.
4141
///

0 commit comments

Comments
 (0)