cargo-clippy tells us that the `crate::helpers::json::to_writer` and
`crate::helpers::toml::to_writer` functions were implemented without
checking the return value of the `write()` function called inside.
That might lead to serious issues on the user site, if indeed not all
bytes were written.
This patch fixes the issue of the user not knowning about the issue by
introducing a new error variant and returning it in case of unfinished
writes.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This patch makes the `Headers` helper type that is only used to be able
to implement Serialize on it only contain a reference to the actual
headers. This way we don't need to clone() the object returned by
`reqwest::Repsonse::headers()`.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This fixes a bug where a chunked response would be partially read and then hang forever waiting for another chunk, and adds additional debug logging to the request process.
- Use reqwest's async client
- Convert items_iter() to a futures::Stream
- make Mastodon client an Arc smart pointer, removing the need for OwnedPage.
- remove MastodonClient and HttpSender traits; these can be re-added once async trait fns are stabilized
- make EventStream a futures::Stream