8 Commits

Author SHA1 Message Date
Hayden Stainsby
485ca3e37c
stream: add track_caller to public APIs (#4786)
Functions that may panic can be annotated with `#[track_caller]` so that
in the event of a panic, the function where the user called the
panicking function is shown instead of the file and line within Tokio
source.

This change adds `#[track_caller]` to all the non-unstable public APIs
in tokio-stream (only `chunks_timeout` in `StreamExt`) where the
documentation describes how this function may panic due to incorrect
input.

A test has been included to cover the panic.

Refs: #4413
2022-06-22 17:27:23 +00:00
jefftt
7011a68343
time: add StreamExt::chunks_timeout (#4695) 2022-06-06 16:16:50 +02:00
Gabriel Grubba
b09899832c
stream: fix disabled tests (#4441) 2022-01-28 17:30:07 +01:00
Colin Walters
e1c8b5a159
tests: add #[cfg(sync)] to watch test (#4183) 2021-10-21 09:11:14 +02:00
Alice Ryhl
8170e2787c
sync: fix watch wrapper (#3914) 2021-07-02 23:24:02 +02:00
Taiki Endo
9d8b37d51a
macros: suppress clippy::default_numeric_fallback lint in generated code (#3831) 2021-06-02 18:16:23 +09:00
Folyd
f3ed064a26
chore: update *::{max, min}_value() to const *::MAX and *::MIN respectively (#3794) 2021-05-17 12:31:58 +02:00
Lucio Franco
8efa62013b
Move stream items into tokio-stream (#3277)
This change removes all references to `Stream` from
within the `tokio` crate and moves them into a new
`tokio-stream` crate. Most types have had their
`impl Stream` removed as well in-favor of their
inherent methods.

Closes #2870
2020-12-15 20:24:38 -08:00