From 91b4246e1b47f1cf75a2432210aaa88dc1d1dba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Mustoha?= Date: Wed, 22 Apr 2015 21:08:43 +0200 Subject: [PATCH] Fix some irregular indentation. --- components/net/mime_classifier.rs | 24 ++++++++++++------------ components/script/dom/treewalker.rs | 22 +++++++++++----------- components/script/dom/window.rs | 8 ++++---- components/script/script_task.rs | 2 +- ports/cef/core.rs | 2 +- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/components/net/mime_classifier.rs b/components/net/mime_classifier.rs index fabfdae9e8a..7d792cfb6f7 100644 --- a/components/net/mime_classifier.rs +++ b/components/net/mime_classifier.rs @@ -6,13 +6,13 @@ use std::borrow::ToOwned; use std::cmp::max; pub struct MIMEClassifier { - image_classifier: GroupedClassifier, - audio_video_classifer: GroupedClassifier, - scriptable_classifier: GroupedClassifier, - plaintext_classifier: GroupedClassifier, - archive_classifer: GroupedClassifier, - binary_or_plaintext: BinaryOrPlaintextClassifier, - feeds_classifier: FeedsClassifier + image_classifier: GroupedClassifier, + audio_video_classifer: GroupedClassifier, + scriptable_classifier: GroupedClassifier, + plaintext_classifier: GroupedClassifier, + archive_classifer: GroupedClassifier, + binary_or_plaintext: BinaryOrPlaintextClassifier, + feeds_classifier: FeedsClassifier } impl MIMEClassifier { @@ -313,7 +313,7 @@ impl MIMEChecker for BinaryOrPlaintextClassifier { } } struct GroupedClassifier { - byte_matchers: Vec>, + byte_matchers: Vec>, } impl GroupedClassifier { fn image_classifer() -> GroupedClassifier { @@ -406,12 +406,12 @@ impl GroupedClassifier { } } impl MIMEChecker for GroupedClassifier { - fn classify(&self,data: &Vec) -> Option<(String, String)> { + fn classify(&self,data: &Vec) -> Option<(String, String)> { self.byte_matchers .iter() .filter_map(|matcher| matcher.classify(data)) .next() - } + } } struct FeedsClassifier; @@ -840,12 +840,12 @@ impl ByteMatcher { //The string "ByteMatcher { - ByteMatcher{ + ByteMatcher { pattern: b"ByteMatcher { diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs index 37e920cf9b1..da0e0846a6d 100644 --- a/components/script/dom/treewalker.rs +++ b/components/script/dom/treewalker.rs @@ -540,18 +540,18 @@ impl<'a> TreeWalkerHelpers for JSRef<'a, TreeWalker> { impl<'a> Iterator for JSRef<'a, TreeWalker> { type Item = JSRef<'a, Node>; - fn next(&mut self) -> Option> { - match self.next_node() { - Ok(node) => node.map(|n| n.root().get_unsound_ref_forever()), - Err(_) => - // The Err path happens only when a JavaScript - // NodeFilter throws an exception. This iterator - // is meant for internal use from Rust code, which - // will probably be using a native Rust filter, - // which cannot produce an Err result. - unreachable!() + fn next(&mut self) -> Option> { + match self.next_node() { + Ok(node) => node.map(|n| n.root().get_unsound_ref_forever()), + Err(_) => + // The Err path happens only when a JavaScript + // NodeFilter throws an exception. This iterator + // is meant for internal use from Rust code, which + // will probably be using a native Rust filter, + // which cannot produce an Err result. + unreachable!() } - } + } } #[jstraceable] diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index b46a5af952d..c51f6af993d 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -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 // because it was built for infinite clip (MAX_RECT). had_clip_rect - } + } - fn set_devtools_wants_updates(self, value: bool) { - self.devtools_wants_updates.set(value); - } + fn set_devtools_wants_updates(self, value: bool) { + self.devtools_wants_updates.set(value); + } // https://html.spec.whatwg.org/multipage/#accessing-other-browsing-contexts fn IndexedGetter(self, _index: u32, _found: &mut bool) -> Option> { diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 14638ddcd82..7022275bd00 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -778,7 +778,7 @@ impl ScriptTask { return; } panic!("Page rect message sent to nonexistent pipeline"); - } + } /// 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) { diff --git a/ports/cef/core.rs b/ports/cef/core.rs index 3a2e3da09d7..7a27f37618f 100644 --- a/ports/cef/core.rs +++ b/ports/cef/core.rs @@ -110,7 +110,7 @@ pub extern "C" fn cef_execute_process(_args: *const cef_main_args_t, _app: *mut cef_app_t, _windows_sandbox_info: *mut c_void) -> c_int { - -1 + -1 } #[no_mangle]