Fix some irregular indentation.

This commit is contained in:
Mátyás Mustoha 2015-04-22 21:08:43 +02:00
parent 8efd70b01b
commit 91b4246e1b
5 changed files with 29 additions and 29 deletions

View file

@ -6,13 +6,13 @@ use std::borrow::ToOwned;
use std::cmp::max; use std::cmp::max;
pub struct MIMEClassifier { pub struct MIMEClassifier {
image_classifier: GroupedClassifier, image_classifier: GroupedClassifier,
audio_video_classifer: GroupedClassifier, audio_video_classifer: GroupedClassifier,
scriptable_classifier: GroupedClassifier, scriptable_classifier: GroupedClassifier,
plaintext_classifier: GroupedClassifier, plaintext_classifier: GroupedClassifier,
archive_classifer: GroupedClassifier, archive_classifer: GroupedClassifier,
binary_or_plaintext: BinaryOrPlaintextClassifier, binary_or_plaintext: BinaryOrPlaintextClassifier,
feeds_classifier: FeedsClassifier feeds_classifier: FeedsClassifier
} }
impl MIMEClassifier { impl MIMEClassifier {
@ -313,7 +313,7 @@ impl MIMEChecker for BinaryOrPlaintextClassifier {
} }
} }
struct GroupedClassifier { struct GroupedClassifier {
byte_matchers: Vec<Box<MIMEChecker + Send + Sync>>, byte_matchers: Vec<Box<MIMEChecker + Send + Sync>>,
} }
impl GroupedClassifier { impl GroupedClassifier {
fn image_classifer() -> GroupedClassifier { fn image_classifer() -> GroupedClassifier {
@ -406,12 +406,12 @@ impl GroupedClassifier {
} }
} }
impl MIMEChecker for GroupedClassifier { impl MIMEChecker for GroupedClassifier {
fn classify(&self,data: &Vec<u8>) -> Option<(String, String)> { fn classify(&self,data: &Vec<u8>) -> Option<(String, String)> {
self.byte_matchers self.byte_matchers
.iter() .iter()
.filter_map(|matcher| matcher.classify(data)) .filter_map(|matcher| matcher.classify(data))
.next() .next()
} }
} }
struct FeedsClassifier; struct FeedsClassifier;
@ -840,12 +840,12 @@ impl ByteMatcher {
//The string "<?xml". //The string "<?xml".
fn text_xml()->ByteMatcher { fn text_xml()->ByteMatcher {
ByteMatcher{ ByteMatcher {
pattern: b"<?xml", pattern: b"<?xml",
mask: b"\xFF\xFF\xFF\xFF\xFF", mask: b"\xFF\xFF\xFF\xFF\xFF",
content_type: ("text", "xml"), content_type: ("text", "xml"),
leading_ignore: b"\t\n\x0C\r " leading_ignore: b"\t\n\x0C\r "
} }
} }
//The string "%PDF-", the PDF signature. //The string "%PDF-", the PDF signature.
fn application_pdf()->ByteMatcher { fn application_pdf()->ByteMatcher {

View file

@ -540,18 +540,18 @@ impl<'a> TreeWalkerHelpers for JSRef<'a, TreeWalker> {
impl<'a> Iterator for JSRef<'a, TreeWalker> { impl<'a> Iterator for JSRef<'a, TreeWalker> {
type Item = JSRef<'a, Node>; type Item = JSRef<'a, Node>;
fn next(&mut self) -> Option<JSRef<'a, Node>> { fn next(&mut self) -> Option<JSRef<'a, Node>> {
match self.next_node() { match self.next_node() {
Ok(node) => node.map(|n| n.root().get_unsound_ref_forever()), Ok(node) => node.map(|n| n.root().get_unsound_ref_forever()),
Err(_) => Err(_) =>
// The Err path happens only when a JavaScript // The Err path happens only when a JavaScript
// NodeFilter throws an exception. This iterator // NodeFilter throws an exception. This iterator
// is meant for internal use from Rust code, which // is meant for internal use from Rust code, which
// will probably be using a native Rust filter, // will probably be using a native Rust filter,
// which cannot produce an Err result. // which cannot produce an Err result.
unreachable!() unreachable!()
} }
} }
} }
#[jstraceable] #[jstraceable]

View file

@ -778,11 +778,11 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
// If we didn't have a clip rect, the previous display doesn't need rebuilding // If we didn't have a clip rect, the previous display doesn't need rebuilding
// because it was built for infinite clip (MAX_RECT). // because it was built for infinite clip (MAX_RECT).
had_clip_rect had_clip_rect
} }
fn set_devtools_wants_updates(self, value: bool) { fn set_devtools_wants_updates(self, value: bool) {
self.devtools_wants_updates.set(value); self.devtools_wants_updates.set(value);
} }
// https://html.spec.whatwg.org/multipage/#accessing-other-browsing-contexts // https://html.spec.whatwg.org/multipage/#accessing-other-browsing-contexts
fn IndexedGetter(self, _index: u32, _found: &mut bool) -> Option<Temporary<Window>> { fn IndexedGetter(self, _index: u32, _found: &mut bool) -> Option<Temporary<Window>> {

View file

@ -778,7 +778,7 @@ impl ScriptTask {
return; return;
} }
panic!("Page rect message sent to nonexistent pipeline"); panic!("Page rect message sent to nonexistent pipeline");
} }
/// Handle a request to load a page in a new child frame of an existing page. /// Handle a request to load a page in a new child frame of an existing page.
fn handle_new_layout(&self, new_layout_info: NewLayoutInfo) { fn handle_new_layout(&self, new_layout_info: NewLayoutInfo) {

View file

@ -110,7 +110,7 @@ pub extern "C" fn cef_execute_process(_args: *const cef_main_args_t,
_app: *mut cef_app_t, _app: *mut cef_app_t,
_windows_sandbox_info: *mut c_void) _windows_sandbox_info: *mut c_void)
-> c_int { -> c_int {
-1 -1
} }
#[no_mangle] #[no_mangle]