tokio-rs / tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
https://tokio.rs
MIT License
26.59k stars 2.45k forks source link

stream: change the visibility of stream adaptor structures to public #6657

Closed sharpened-nacho closed 3 months ago

sharpened-nacho commented 3 months ago

Added pub to all use declarations in stream_ext.rs, except for Collect as it should stay private, as stated in its doc.

Fixes: #6656

Motivation

The StreamExt trait provides the helpful method take, map, and the like on Streams. But the structures themselves (Take, Map, etc.) are not visible outside the crate, as they are not pub use in stream_ext.rs.

Solution

Added pub to all use declarations in stream_ext.rs, except for Collect as it should stay private, as stated in its doc.

sharpened-nacho commented 3 months ago

Looks like I need some time to understand the visibility error :/ Sorry for being bad at this whole process, learning :)

Darksonn commented 3 months ago

You don't have to open a new PR if the build fails. You can push additional commits to an existing PRs.