mirror of
https://github.com/actix/actix-web.git
synced 2024-12-17 13:46:36 +00:00
Remove unwrap from multipart ?
Cleanup more unwrap. Switch inner field from Rc to Arc Wrap with mutex instead of refcell Arc for safety Revert "Arc for safety" This reverts commit d4262c76934b5b22237f4ba0202da34f76ec1456. Revert "Wrap with mutex instead of refcell" This reverts commit 5c0645efb4a66c8f24257244c9f0cd4201863733. Revert "Cleanup more unwrap. Switch inner field from Rc to Arc" This reverts commit fb6175d618d4ceae28a207a5e6a9c68ff8ded18d.
This commit is contained in:
parent
37d304b0f2
commit
9cc7f620aa
1 changed files with 1 additions and 1 deletions
|
@ -465,7 +465,7 @@ impl Stream for Field {
|
||||||
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
||||||
let this = self.get_mut();
|
let this = self.get_mut();
|
||||||
let mut inner = this.inner.borrow_mut();
|
let mut inner = this.inner.borrow_mut();
|
||||||
if let Some(mut buffer) = inner.payload.as_ref().unwrap().get_mut(&this.safety) {
|
if let Some(mut buffer) = inner.payload.as_ref().and_then(|p| p.get_mut(&this.safety)) {
|
||||||
// check safety and poll read payload to buffer.
|
// check safety and poll read payload to buffer.
|
||||||
buffer.poll_stream(cx)?;
|
buffer.poll_stream(cx)?;
|
||||||
} else if !this.safety.is_clean() {
|
} else if !this.safety.is_clean() {
|
||||||
|
|
Loading…
Reference in a new issue