Skip to content

Commit

Permalink
io: add inline attribute to AsyncSeek implementations
Browse files Browse the repository at this point in the history
This follows the style of the other trait implementations of `Empty`.

See <#6663 (comment)>.
  • Loading branch information
zaeleus committed Jun 30, 2024
1 parent efd2c0a commit 3bb5835
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tokio/src/io/util/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ impl AsyncWrite for Empty {
}

impl AsyncSeek for Empty {
#[inline]
fn start_seek(self: Pin<&mut Self>, _position: SeekFrom) -> io::Result<()> {
Ok(())
}

#[inline]
fn poll_complete(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<u64>> {
ready!(crate::trace::trace_leaf(cx));
ready!(poll_proceed_and_make_progress(cx));
Expand Down

0 comments on commit 3bb5835

Please sign in to comment.