Skip to content

io: document the default capacity of the ReaderStream#7147

Merged
ADD-SP merged 4 commits intotokio-rs:masterfrom
Owez:master
Dec 12, 2025
Merged

io: document the default capacity of the ReaderStream#7147
ADD-SP merged 4 commits intotokio-rs:masterfrom
Owez:master

Conversation

@Owez
Copy link
Copy Markdown
Contributor

@Owez Owez commented Feb 8, 2025

Motivation

I had to read the source to figure out the default ReaderStream capacity

Solution

Add a little docstring line to the typical ::new() for ReaderStream to document. DEFAULT_CAPACITY is private, we could alternatively publicise it and link in the docstring to it?

@maminrayej maminrayej added T-docs Topic: documentation A-tokio-util Area: The tokio-util crate labels Feb 8, 2025
@maminrayej
Copy link
Copy Markdown
Member

maminrayej commented Feb 10, 2025

Thanks for the PR.

I believe changing 4KiB to 4 KiB will fix the check-spelling job.

@Owez
Copy link
Copy Markdown
Contributor Author

Owez commented Feb 10, 2025

Thanks for the PR.

I believe changing 4KiB to 4 KiB will fix the check-spelling job.

Oh yeah, will do :)

@ADD-SP
Copy link
Copy Markdown
Member

ADD-SP commented Aug 21, 2025

Hi @Owez , are you still going to work on this improvement?

Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
@github-actions github-actions bot added the R-loom-util Run loom tokio-util tests on this PR label Dec 12, 2025
@ADD-SP ADD-SP added the M-io Module: tokio/io label Dec 12, 2025
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Copy link
Copy Markdown
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Thanks

@ADD-SP ADD-SP changed the title io: document default ReaderStream capacity io: document the default capacity of the ReaderStream Dec 12, 2025
@ADD-SP ADD-SP merged commit 0ec0a85 into tokio-rs:master Dec 12, 2025
159 of 161 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio-util Area: The tokio-util crate M-io Module: tokio/io R-loom-util Run loom tokio-util tests on this PR T-docs Topic: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants