mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
clippy: Fix option_map_unit_fn warnings (#31906)
This commit is contained in:
parent
a5bcae212a
commit
da76ebabe9
11 changed files with 43 additions and 30 deletions
|
@ -1127,13 +1127,13 @@ impl XMLHttpRequest {
|
|||
// Part of step 13, send() (processing response)
|
||||
// XXXManishearth handle errors, if any (substep 1)
|
||||
// Substep 2
|
||||
status.map(|(code, reason)| {
|
||||
if let Some((code, reason)) = status {
|
||||
self.status.set(code);
|
||||
*self.status_text.borrow_mut() = ByteString::new(reason);
|
||||
});
|
||||
headers
|
||||
.as_ref()
|
||||
.map(|h| *self.response_headers.borrow_mut() = h.clone());
|
||||
}
|
||||
if let Some(h) = headers.as_ref() {
|
||||
*self.response_headers.borrow_mut() = h.clone();
|
||||
}
|
||||
{
|
||||
let len = headers.and_then(|h| h.typed_get::<ContentLength>());
|
||||
let mut response = self.response.borrow_mut();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue