mirror of
https://github.com/actix/actix-web.git
synced 2024-12-17 13:46:36 +00:00
Remove unwrap from multipart server.rs
This commit is contained in:
parent
9cc7f620aa
commit
77fded2ea2
1 changed files with 1 additions and 1 deletions
|
@ -643,7 +643,7 @@ impl InnerField {
|
|||
return Poll::Ready(None);
|
||||
}
|
||||
|
||||
let result = if let Some(mut payload) = self.payload.as_ref().unwrap().get_mut(s) {
|
||||
let result = if let Some(mut payload) = self.payload.as_ref().and_then(|p| p.get_mut(s)) {
|
||||
if !self.eof {
|
||||
let res = if let Some(ref mut len) = self.length {
|
||||
InnerField::read_len(&mut payload, len)
|
||||
|
|
Loading…
Reference in a new issue