mirror of
https://github.com/servo/servo.git
synced 2025-07-21 22:33:41 +01:00
clippy: Fix a bunch of warnings in script
(#32680)
This is just a portion of the errors that are remaining to be fixed.
This commit is contained in:
parent
93fdb8263d
commit
26624a109f
27 changed files with 150 additions and 113 deletions
|
@ -917,14 +917,14 @@ impl HTMLFormElement {
|
|||
|
||||
url.query().unwrap_or("").to_string().into_bytes()
|
||||
},
|
||||
FormEncType::FormDataEncoded => {
|
||||
FormEncType::MultipartFormData => {
|
||||
let mime: Mime = format!("multipart/form-data; boundary={}", boundary)
|
||||
.parse()
|
||||
.unwrap();
|
||||
load_data.headers.typed_insert(ContentType::from(mime));
|
||||
encode_multipart_form_data(form_data, boundary, encoding)
|
||||
},
|
||||
FormEncType::TextPlainEncoded => {
|
||||
FormEncType::TextPlain => {
|
||||
load_data
|
||||
.headers
|
||||
.typed_insert(ContentType::from(mime::TEXT_PLAIN));
|
||||
|
@ -1366,9 +1366,9 @@ impl FormDatum {
|
|||
|
||||
#[derive(Clone, Copy, MallocSizeOf)]
|
||||
pub enum FormEncType {
|
||||
TextPlainEncoded,
|
||||
TextPlain,
|
||||
UrlEncoded,
|
||||
FormDataEncoded,
|
||||
MultipartFormData,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, MallocSizeOf)]
|
||||
|
@ -1420,8 +1420,8 @@ impl<'a> FormSubmitter<'a> {
|
|||
),
|
||||
};
|
||||
match &*attr {
|
||||
"multipart/form-data" => FormEncType::FormDataEncoded,
|
||||
"text/plain" => FormEncType::TextPlainEncoded,
|
||||
"multipart/form-data" => FormEncType::MultipartFormData,
|
||||
"text/plain" => FormEncType::TextPlain,
|
||||
// https://html.spec.whatwg.org/multipage/#attr-fs-enctype
|
||||
// urlencoded is the default
|
||||
_ => FormEncType::UrlEncoded,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue