mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
clippy: Fix redundant_*
warnings (#32056)
* clippy: Fix `redundant_field_names` warnings * clippy: Fix other `redundant_*` warnings * docs: Update docstring comments
This commit is contained in:
parent
e3ad76d994
commit
b3d9924396
8 changed files with 68 additions and 73 deletions
|
@ -161,14 +161,14 @@ impl ElementInternals {
|
|||
SubmissionValue::USVString(string) => {
|
||||
entry_list.push(FormDatum {
|
||||
ty: DOMString::from("string"),
|
||||
name: name,
|
||||
name,
|
||||
value: FormDatumValue::String(DOMString::from(string.to_string())),
|
||||
});
|
||||
},
|
||||
SubmissionValue::File(file) => {
|
||||
entry_list.push(FormDatum {
|
||||
ty: DOMString::from("file"),
|
||||
name: name,
|
||||
name,
|
||||
value: FormDatumValue::File(DomRoot::from_ref(&*file)),
|
||||
});
|
||||
},
|
||||
|
@ -238,7 +238,7 @@ impl ElementInternalsMethods for ElementInternals {
|
|||
if bits.is_empty() {
|
||||
self.set_validation_message(DOMString::new());
|
||||
} else {
|
||||
self.set_validation_message(message.unwrap_or_else(|| DOMString::new()));
|
||||
self.set_validation_message(message.unwrap_or_else(DOMString::new));
|
||||
}
|
||||
|
||||
// Step 6: If element's customError validity flag is true, then set element's custom validity error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue