Skip to content

Commit

Permalink
Fix typo (#2603)
Browse files Browse the repository at this point in the history
SeeKRelative -> SeekRelative
  • Loading branch information
taiki-e committed May 28, 2022
1 parent c0e02d2 commit 4e210b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions futures-util/src/io/buf_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ impl<R: AsyncRead + AsyncSeek> BufReader<R> {
/// the buffer will not be flushed, allowing for more efficient seeks.
/// This method does not return the location of the underlying reader, so the caller
/// must track this information themselves if it is required.
pub fn seek_relative(self: Pin<&mut Self>, offset: i64) -> SeeKRelative<'_, R> {
SeeKRelative { inner: self, offset, first: true }
pub fn seek_relative(self: Pin<&mut Self>, offset: i64) -> SeekRelative<'_, R> {
SeekRelative { inner: self, offset, first: true }
}

/// Attempts to seek relative to the current position. If the new position lies within the buffer,
Expand Down Expand Up @@ -232,13 +232,13 @@ impl<R: AsyncRead + AsyncSeek> AsyncSeek for BufReader<R> {
/// Future for the [`BufReader::seek_relative`](self::BufReader::seek_relative) method.
#[derive(Debug)]
#[must_use = "futures do nothing unless polled"]
pub struct SeeKRelative<'a, R> {
pub struct SeekRelative<'a, R> {
inner: Pin<&'a mut BufReader<R>>,
offset: i64,
first: bool,
}

impl<R> Future for SeeKRelative<'_, R>
impl<R> Future for SeekRelative<'_, R>
where
R: AsyncRead + AsyncSeek,
{
Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mod allow_std;
pub use self::allow_std::AllowStdIo;

mod buf_reader;
pub use self::buf_reader::{BufReader, SeeKRelative};
pub use self::buf_reader::{BufReader, SeekRelative};

mod buf_writer;
pub use self::buf_writer::BufWriter;
Expand Down
10 changes: 5 additions & 5 deletions futures/tests/auto_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,11 +817,11 @@ pub mod io {
assert_impl!(Seek<'_, ()>: Unpin);
assert_not_impl!(Seek<'_, PhantomPinned>: Unpin);

assert_impl!(SeeKRelative<'_, ()>: Send);
assert_not_impl!(SeeKRelative<'_, *const ()>: Send);
assert_impl!(SeeKRelative<'_, ()>: Sync);
assert_not_impl!(SeeKRelative<'_, *const ()>: Sync);
assert_impl!(SeeKRelative<'_, PhantomPinned>: Unpin);
assert_impl!(SeekRelative<'_, ()>: Send);
assert_not_impl!(SeekRelative<'_, *const ()>: Send);
assert_impl!(SeekRelative<'_, ()>: Sync);
assert_not_impl!(SeekRelative<'_, *const ()>: Sync);
assert_impl!(SeekRelative<'_, PhantomPinned>: Unpin);

assert_impl!(Sink: Send);
assert_impl!(Sink: Sync);
Expand Down

0 comments on commit 4e210b8

Please sign in to comment.