Skip to content

Commit

Permalink
Cleanup commented code.
Browse files Browse the repository at this point in the history
Signed-off-by: David Calavera <[email protected]>
  • Loading branch information
calavera committed Dec 9, 2023
1 parent 8e7519a commit 0638255
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
1 change: 0 additions & 1 deletion lambda-http/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ where
// assumes utf-8
Box::pin(async move {
let bytes = body.collect().await.expect("unable to read bytes from body").to_bytes();
// let bytes = to_bytes(body).await.expect("unable to read bytes from body");
let (content, _, _) = encoding.decode(&bytes);

match content {
Expand Down
14 changes: 0 additions & 14 deletions lambda-runtime-api-client/src/body/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,6 @@ impl Body {
(sender, Body::new(body))
}

// /// Create a new `Body` from a [`Stream`].
// ///
// /// [`Stream`]: https://docs.rs/futures-core/latest/futures_core/stream/trait.Stream.html
// pub fn from_stream<S>(stream: S) -> Self
// where
// S: TryStream + Send + 'static,
// S::Ok: Into<Bytes>,
// S::Error: Into<BoxError>,
// {
// Self::new(StreamBody {
// stream: SyncWrapper::new(stream),
// })
// }

/// Collect the body into `Bytes`
pub async fn collect(self) -> Result<Collected<Bytes>, Error> {
self.0.collect().await
Expand Down
20 changes: 0 additions & 20 deletions lambda-runtime/src/simulated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ impl Connection for DuplexStreamWrapper {
}
}

// impl AsyncRead for DuplexStreamWrapper {
// fn poll_read(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<IoResult<()>> {
// Pin::new(&mut self.0).poll_read(cx, buf)
// }
// }

impl Read for DuplexStreamWrapper {
fn poll_read(
self: Pin<&mut Self>,
Expand Down Expand Up @@ -137,17 +131,3 @@ impl Write for DuplexStreamWrapper {
tokio::io::AsyncWrite::poll_write_vectored(self.project().inner, cx, bufs)
}
}

// impl AsyncWrite for DuplexStreamWrapper {
// fn poll_write(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize, std::io::Error>> {
// Pin::new(&mut self.0).poll_write(cx, buf)
// }

// fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
// Pin::new(&mut self.0).poll_flush(cx)
// }

// fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
// Pin::new(&mut self.0).poll_shutdown(cx)
// }
// }

0 comments on commit 0638255

Please sign in to comment.