mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 08:57:00 +02:00
clippy warnings
This commit is contained in:
34
src/with.rs
34
src/with.rs
@@ -307,8 +307,10 @@ where
|
||||
Async::Ready(item) => {
|
||||
self.item = Some(item);
|
||||
self.fut1.take();
|
||||
self.fut2 =
|
||||
Some(Box::new(T2::from_request(&self.req, self.cfg2.as_ref())));
|
||||
self.fut2 = Some(Box::new(T2::from_request(
|
||||
&self.req,
|
||||
self.cfg2.as_ref(),
|
||||
)));
|
||||
}
|
||||
Async::NotReady => return Ok(Async::NotReady),
|
||||
}
|
||||
@@ -508,8 +510,10 @@ where
|
||||
Async::Ready(item) => {
|
||||
self.item1 = Some(item);
|
||||
self.fut1.take();
|
||||
self.fut2 =
|
||||
Some(Box::new(T2::from_request(&self.req, self.cfg2.as_ref())));
|
||||
self.fut2 = Some(Box::new(T2::from_request(
|
||||
&self.req,
|
||||
self.cfg2.as_ref(),
|
||||
)));
|
||||
}
|
||||
Async::NotReady => return Ok(Async::NotReady),
|
||||
}
|
||||
@@ -520,8 +524,10 @@ where
|
||||
Async::Ready(item) => {
|
||||
self.item2 = Some(item);
|
||||
self.fut2.take();
|
||||
self.fut3 =
|
||||
Some(Box::new(T3::from_request(&self.req, self.cfg3.as_ref())));
|
||||
self.fut3 = Some(Box::new(T3::from_request(
|
||||
&self.req,
|
||||
self.cfg3.as_ref(),
|
||||
)));
|
||||
}
|
||||
Async::NotReady => return Ok(Async::NotReady),
|
||||
}
|
||||
@@ -533,13 +539,15 @@ where
|
||||
};
|
||||
|
||||
let hnd: &mut F = unsafe { &mut *self.hnd.get() };
|
||||
let item =
|
||||
match (*hnd)(self.item1.take().unwrap(), self.item2.take().unwrap(), item)
|
||||
.respond_to(self.req.drop_state())
|
||||
{
|
||||
Ok(item) => item.into(),
|
||||
Err(err) => return Err(err.into()),
|
||||
};
|
||||
let item = match (*hnd)(
|
||||
self.item1.take().unwrap(),
|
||||
self.item2.take().unwrap(),
|
||||
item,
|
||||
).respond_to(self.req.drop_state())
|
||||
{
|
||||
Ok(item) => item.into(),
|
||||
Err(err) => return Err(err.into()),
|
||||
};
|
||||
|
||||
match item.into() {
|
||||
ReplyItem::Message(resp) => return Ok(Async::Ready(resp)),
|
||||
|
Reference in New Issue
Block a user