1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

remove unpin from body types (#2152)

This commit is contained in:
Rob Ede
2021-04-13 11:16:12 +01:00
committed by GitHub
parent ce50cc9523
commit edd9f14752
19 changed files with 241 additions and 194 deletions

View File

@ -1,13 +1,13 @@
use std::{env, io};
use actix_http::http::HeaderValue;
use actix_http::{body::Body, http::HeaderValue};
use actix_http::{Error, HttpService, Request, Response};
use actix_server::Server;
use bytes::BytesMut;
use futures_util::StreamExt as _;
use log::info;
async fn handle_request(mut req: Request) -> Result<Response, Error> {
async fn handle_request(mut req: Request) -> Result<Response<Body>, Error> {
let mut body = BytesMut::new();
while let Some(item) = req.payload().next().await {
body.extend_from_slice(&item?)