mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add style check, test, and code fixes for an else brace check.
This commit is contained in:
parent
80cb0cf821
commit
6642358217
9 changed files with 26 additions and 20 deletions
|
@ -133,9 +133,8 @@ impl AsyncResponseListener for HTMLMediaElementContext {
|
|||
|
||||
// Step 5
|
||||
elem.fire_simple_event("error");
|
||||
}
|
||||
// => "If the media data cannot be fetched at all..."
|
||||
else {
|
||||
} else {
|
||||
// => "If the media data cannot be fetched at all..."
|
||||
elem.queue_dedicated_media_source_failure_steps();
|
||||
}
|
||||
|
||||
|
|
|
@ -1128,9 +1128,8 @@ impl XMLHttpRequest {
|
|||
// Step 5
|
||||
if self.response_type.get() == XMLHttpRequestResponseType::_empty {
|
||||
return None;
|
||||
}
|
||||
// Step 6
|
||||
else {
|
||||
} else {
|
||||
// Step 6
|
||||
temp_doc = self.document_text_html();
|
||||
}
|
||||
},
|
||||
|
@ -1143,8 +1142,7 @@ impl XMLHttpRequest {
|
|||
Some(Mime(_, mime::SubLevel::Ext(sub), _)) => {
|
||||
if sub.ends_with("+xml") {
|
||||
temp_doc = self.handle_xml();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -374,8 +374,7 @@ pub fn handle_is_selected(context: &BrowsingContext,
|
|||
}
|
||||
else if let Some(_) = node.downcast::<HTMLElement>() {
|
||||
Ok(false) // regular elements are not selectable
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Err(())
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue