diff --git a/components/layout/block.rs b/components/layout/block.rs index f7370e00a4e..5934a506eda 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -1283,8 +1283,8 @@ impl BlockFlow { content_block_size, available_block_size)); - candidate_block_size_iterator.candidate_value - = solution.unwrap().block_size; + candidate_block_size_iterator.candidate_value = + solution.unwrap().block_size; } } } diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 7c039d38729..6671a07b4ad 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1290,8 +1290,8 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> for kid in node.children() { // CSS 2.1 ยง 17.2.1. Treat all non-column child fragments of `table-column-group` // as `display: none`. - if let ConstructionResult::ConstructionItem(ConstructionItem::TableColumnFragment(fragment)) - = kid.swap_out_construction_result() { + if let ConstructionResult::ConstructionItem(ConstructionItem::TableColumnFragment(fragment)) = + kid.swap_out_construction_result() { col_fragments.push(fragment) } } diff --git a/components/style/thread_state.rs b/components/style/thread_state.rs index c06a5833a7d..ab0672e2503 100644 --- a/components/style/thread_state.rs +++ b/components/style/thread_state.rs @@ -51,8 +51,8 @@ macro_rules! thread_types ( ( $( $fun:ident = $flag:ident ; )* ) => ( } #[cfg(debug_assertions)] - static TYPES: &'static [ThreadState] - = &[ $( $flag ),* ]; + static TYPES: &'static [ThreadState] = + &[ $( $flag ),* ]; )); thread_types! { diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 92d06d1712c..28bf84600a3 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -520,6 +520,8 @@ def check_rust(file_name, lines): lambda match, line: is_attribute), (r"=[A-Za-z0-9\"]", "missing space after =", lambda match, line: is_attribute), + (r"^=\s", "no = in the beginning of line", + lambda match, line: not is_comment), # ignore scientific notation patterns like 1e-6 (r"[A-DF-Za-df-z0-9]-", "missing space before -", lambda match, line: not is_attribute), diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs index 79be0ff1580..25da55e5bf8 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -59,4 +59,7 @@ impl test { // Should not be triggered macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ()); + + let var + = "val"; } diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index 7adcbda2dfe..d8738b08981 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -125,6 +125,7 @@ class CheckTidiness(unittest.TestCase): self.assertEqual('extra space after (', errors.next()[2]) self.assertEqual('extra space after (', errors.next()[2]) self.assertEqual('extra space after test_fun', errors.next()[2]) + self.assertEqual('no = in the beginning of line', errors.next()[2]) self.assertNoMoreErrors(errors) feature_errors = tidy.collect_errors_for_files(iterFile('lib.rs'), [], [tidy.check_rust], print_text=False)