aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/formdata.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/formdata.rs')
-rw-r--r--components/script/dom/formdata.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/components/script/dom/formdata.rs b/components/script/dom/formdata.rs
index 2a3a52df8eb..6c8c7e057a9 100644
--- a/components/script/dom/formdata.rs
+++ b/components/script/dom/formdata.rs
@@ -181,10 +181,8 @@ impl FormDataMethods<crate::DomTypeHolder> for FormData {
.iter()
.find(|(datum_name, _)| datum_name.0 == name.0)
.map(|(_, datum)| match &datum.value {
- FormDatumValue::String(ref s) => {
- FileOrUSVString::USVString(USVString(s.to_string()))
- },
- FormDatumValue::File(ref b) => FileOrUSVString::File(DomRoot::from_ref(b)),
+ FormDatumValue::String(s) => FileOrUSVString::USVString(USVString(s.to_string())),
+ FormDatumValue::File(b) => FileOrUSVString::File(DomRoot::from_ref(b)),
})
}
@@ -199,10 +197,10 @@ impl FormDataMethods<crate::DomTypeHolder> for FormData {
}
Some(match &datum.value {
- FormDatumValue::String(ref s) => {
+ FormDatumValue::String(s) => {
FileOrUSVString::USVString(USVString(s.to_string()))
},
- FormDatumValue::File(ref b) => FileOrUSVString::File(DomRoot::from_ref(b)),
+ FormDatumValue::File(b) => FileOrUSVString::File(DomRoot::from_ref(b)),
})
})
.collect()
@@ -308,8 +306,8 @@ impl Iterable for FormData {
let data = self.data.borrow();
let datum = &data.get(n as usize).unwrap().1;
match &datum.value {
- FormDatumValue::String(ref s) => FileOrUSVString::USVString(USVString(s.to_string())),
- FormDatumValue::File(ref b) => FileOrUSVString::File(DomRoot::from_ref(b)),
+ FormDatumValue::String(s) => FileOrUSVString::USVString(USVString(s.to_string())),
+ FormDatumValue::File(b) => FileOrUSVString::File(DomRoot::from_ref(b)),
}
}