Update lib.rs

This commit is contained in:
lagudomeze 2020-06-01 10:52:53 +08:00 committed by GitHub
parent 24c1f53bb6
commit e543234550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ impl<State: Send + Sync + 'static> RequestExt<State> for Request<State> {
} else {
let content_type = self
.header(&headers::CONTENT_TYPE)
.and_then(|values| values.first().map(|value| value.to_string()));
.and_then(|values| values.get(0).map(|value| value.to_string()));
(content_type, self).into_query_builder_opts(&opts).await
}
}