jeschkies / async-mesos-rs

An asynchronous client for Mesos HTTP scheduler API.
https://crates.io/crates/async-mesos
Apache License 2.0
4 stars 1 forks source link

RecordIO Stream should return `Async::Ready(None)` instead of `Async::NotReady` #13

Open jeschkies opened 6 years ago

jeschkies commented 6 years ago

According to the Tokio Chat example we should not return Async::NotReady unless the inner stream does. We violate this in client.rs:67. We should return Async::Ready(None) instead.

jeschkies commented 6 years ago

This contradicts a little https://docs.rs/futures/0.1.21/futures/stream/trait.Stream.html#associatedtype.Error. According to the docs a stream is considered finished when it returns Async::Ready(None).