mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix various clippy problems in components/scripts/dom
(#31910)
* boxing is unnecessary * boxing is unnecessary * boxing is unnecessary * boxing is unnecessary * fix * fix * fix * Update globalscope.rs
This commit is contained in:
parent
9243e8cf71
commit
673eaa569a
3 changed files with 3 additions and 3 deletions
|
@ -290,7 +290,7 @@ impl Headers {
|
|||
|
||||
// https://fetch.spec.whatwg.org/#concept-header-extract-mime-type
|
||||
pub fn extract_mime_type(&self) -> Vec<u8> {
|
||||
extract_mime_type(&self.header_list.borrow()).unwrap_or(vec![])
|
||||
extract_mime_type(&self.header_list.borrow()).unwrap_or_default()
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine
|
||||
|
|
|
@ -654,7 +654,7 @@ impl HTMLFormElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#text/plain-encoding-algorithm
|
||||
fn encode_plaintext(&self, form_data: &mut Vec<FormDatum>) -> String {
|
||||
fn encode_plaintext(&self, form_data: &mut [FormDatum]) -> String {
|
||||
// Step 1
|
||||
let mut result = String::new();
|
||||
|
||||
|
|
|
@ -767,7 +767,7 @@ impl HTMLInputElement {
|
|||
first_with_id
|
||||
.as_ref()
|
||||
.and_then(|el| el.downcast::<HTMLDataListElement>())
|
||||
.map(|el| DomRoot::from_ref(el))
|
||||
.map(DomRoot::from_ref)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#suffering-from-being-missing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue