Skip to content

Document RecvStream::poll_data #532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/proto/streams/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,4 @@ impl Deque {
None => None,
}
}

/*
pub fn peek_front<'a, T>(&self, buf: &'a Buffer<T>) -> Option<&'a T> {
match self.indices {
Some(idxs) => Some(&buf.slab[idxs.head].value),
None => None,
}
}
*/
}
7 changes: 1 addition & 6 deletions src/share.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@ pub struct StreamId(u32);
/// See method level documentation for more details on receiving data. See
/// [`FlowControl`] for more details on inbound flow control.
///
/// Note that this type implements [`Stream`], yielding the received data frames.
/// When this implementation is used, the capacity is immediately released when
/// the data is yielded. It is recommended to only use this API when the data
/// will not be retained in memory for extended periods of time.
///
/// [`client::ResponseFuture`]: client/struct.ResponseFuture.html
/// [`server::Connection`]: server/struct.Connection.html
/// [`FlowControl`]: struct.FlowControl.html
Expand Down Expand Up @@ -406,7 +401,7 @@ impl RecvStream {
futures_util::future::poll_fn(move |cx| self.poll_trailers(cx)).await
}

#[doc(hidden)]
/// Poll for the next data frame.
pub fn poll_data(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<Bytes, crate::Error>>> {
self.inner.inner.poll_data(cx).map_err_(Into::into)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/h2-fuzz/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async fn run(script: &[u8]) -> Result<(), h2::Error> {

fn main() {
env_logger::init();
let mut rt = tokio::runtime::Runtime::new().unwrap();
let rt = tokio::runtime::Runtime::new().unwrap();
loop {
honggfuzz::fuzz!(|data: &[u8]| {
eprintln!("{:?}", rt.block_on(run(data)));
Expand Down