mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
fix redundant closures in component/script/dom (#31917)
* fixed unnecessary conversions * resolved conflicts * resolved conflicts * fix redundant closures in component/script/dom * resolved conflicts * fixed formatting
This commit is contained in:
parent
f183170786
commit
1bc63801e7
26 changed files with 35 additions and 44 deletions
|
@ -983,14 +983,14 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
fn GetResponseText(&self) -> Fallible<USVString> {
|
||||
match self.response_type.get() {
|
||||
XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Text => {
|
||||
Ok(USVString(String::from(match self.ready_state.get() {
|
||||
Ok(USVString(match self.ready_state.get() {
|
||||
// Step 3
|
||||
XMLHttpRequestState::Loading | XMLHttpRequestState::Done => {
|
||||
self.text_response()
|
||||
},
|
||||
// Step 2
|
||||
_ => "".to_owned(),
|
||||
})))
|
||||
}))
|
||||
},
|
||||
// Step 1
|
||||
_ => Err(Error::InvalidState),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue