feat(body): upgrade to http-body 1.0.0-rc.2 (#3106)

This commit is contained in:
Sean McArthur
2022-12-29 14:36:18 -05:00
committed by GitHub
parent 468b9af4cc
commit 51b45e3f85
5 changed files with 11 additions and 11 deletions

View File

@@ -27,7 +27,7 @@ async fn echo(
// Convert to uppercase before sending back to client using a stream.
(&Method::POST, "/echo/uppercase") => {
let frame_stream = req.into_body().map_frame(|frame| {
let frame = if let Some(data) = frame.into_data() {
let frame = if let Ok(data) = frame.into_data() {
data.iter()
.map(|byte| byte.to_ascii_uppercase())
.collect::<Bytes>()