Skip to content

Conversation

@tvercruyssen
Copy link
Contributor

Motivation

Since version 1.55 has the Rust std library implemented a convenience function called rewind that is part of the io::Seek trait. I have found this to be a very helpful function in making my code more readable/simpler.

Solution

Implement the rewind function as part of the AsyncSeekExt trait.

[Disclaimer]

The test might not be in the proper place apologies for that. I didn't know of a better place to put it.

@Darksonn Darksonn requested a review from taiki-e September 13, 2021 14:09
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-io Module: tokio/io labels Sep 13, 2021
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

@Darksonn Darksonn merged commit 7af0f32 into tokio-rs:master Sep 14, 2021
@tvercruyssen tvercruyssen deleted the async_seek_ext_rewind branch September 14, 2021 17:49
@Darksonn Darksonn mentioned this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio Area: The main tokio crate M-io Module: tokio/io

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants