rust-lang / futures-rs

Zero-cost asynchronous programming in Rust
https://rust-lang.github.io/futures-rs/
Apache License 2.0
5.4k stars 626 forks source link

docs: io types' getter docs mentions "sink or stream", but it is reader or writer #2681

Open taiki-e opened 1 year ago

taiki-e commented 1 year ago

https://docs.rs/futures/latest/futures/io/struct.Take.html#method.get_ref

Acquires a reference to the underlying sink or stream that this combinator is pulling from.

These methods are defined by the delegate_access_inner macro and we need to fix that macro.

https://github.com/rust-lang/futures-rs/blob/0f83c20103d6f4af661307f2a88eea5ce10697f9/futures-util/src/io/take.rs#L81

https://github.com/rust-lang/futures-rs/blob/0f83c20103d6f4af661307f2a88eea5ce10697f9/futures-util/src/lib.rs#L183-L217