mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fixed some clippy warnings in components (#32025)
* Fixed some clippy warnings in components * Updated the simplification of bolean expressions in componets/script/dom/range.rs
This commit is contained in:
parent
245269c649
commit
89a4820519
6 changed files with 15 additions and 18 deletions
|
@ -1616,13 +1616,12 @@ impl XMLHttpRequest {
|
|||
/// <https://xhr.spec.whatwg.org/#response-mime-type>
|
||||
fn response_mime_type(&self) -> Option<Mime> {
|
||||
return extract_mime_type(&self.response_headers.borrow())
|
||||
.map(|mime_as_bytes| {
|
||||
.and_then(|mime_as_bytes| {
|
||||
String::from_utf8(mime_as_bytes)
|
||||
.unwrap_or_default()
|
||||
.parse()
|
||||
.ok()
|
||||
})
|
||||
.flatten()
|
||||
.or(Some(mime::TEXT_XML));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue