mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 00:44:26 +02:00
change rustfmt line width to 96
This commit is contained in:
@ -3,9 +3,7 @@ use std::future::Future;
|
||||
use std::pin::Pin;
|
||||
use std::task::{Context, Poll};
|
||||
|
||||
use actix::dev::{
|
||||
AsyncContextParts, ContextFut, ContextParts, Envelope, Mailbox, ToEnvelope,
|
||||
};
|
||||
use actix::dev::{AsyncContextParts, ContextFut, ContextParts, Envelope, Mailbox, ToEnvelope};
|
||||
use actix::fut::ActorFuture;
|
||||
use actix::{
|
||||
Actor, ActorContext, ActorState, Addr, AsyncContext, Handler, Message, SpawnHandle,
|
||||
@ -165,10 +163,7 @@ where
|
||||
{
|
||||
type Item = Result<Bytes, Error>;
|
||||
|
||||
fn poll_next(
|
||||
mut self: Pin<&mut Self>,
|
||||
cx: &mut Context<'_>,
|
||||
) -> Poll<Option<Self::Item>> {
|
||||
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
||||
if self.fut.alive() {
|
||||
let _ = Pin::new(&mut self.fut).poll(cx);
|
||||
}
|
||||
@ -233,10 +228,11 @@ mod tests {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_default_resource() {
|
||||
let srv = init_service(App::new().service(web::resource("/test").to(|| {
|
||||
HttpResponse::Ok().streaming(HttpContext::create(MyActor { count: 0 }))
|
||||
})))
|
||||
.await;
|
||||
let srv =
|
||||
init_service(App::new().service(web::resource("/test").to(|| {
|
||||
HttpResponse::Ok().streaming(HttpContext::create(MyActor { count: 0 }))
|
||||
})))
|
||||
.await;
|
||||
|
||||
let req = TestRequest::with_uri("/test").to_request();
|
||||
let resp = call_service(&srv, req).await;
|
||||
|
Reference in New Issue
Block a user