diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-10-31 13:03:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 13:03:32 -0500 |
commit | ccefef5be43b6d174933196fd7552cbbfbdf53d6 (patch) | |
tree | 8c1457ea06877fe7a432380cd061f5ed11039955 /components/script | |
parent | 0d46c7c708b226f25eae72f1d711e4e55fd04527 (diff) | |
parent | 66059904b74a4dacbec8393d639d69cfd9011ea7 (diff) | |
download | servo-ccefef5be43b6d174933196fd7552cbbfbdf53d6.tar.gz servo-ccefef5be43b6d174933196fd7552cbbfbdf53d6.zip |
Auto merge of #13988 - dsprenkels:tidy-fncalls, r=Wafflespeanut
test-tidy: Check for space between function name and `(`
<!-- Please describe your changes on the following line: -->
Disallow an extraneous space in a function call between
the function name and the opening parenthesis in Rust
code, while ignoring macro declarations.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --all` does not report any errors
- [x] `./mach test-tidy --self` does not report any errors
- [x] These changes fix #13980
<!-- Either: -->
- [x] There are tests for these changes, these are written in
- `python/tidy/servo_tidy_tests/rust_tidy.rs`
- `python/tidy/servo_tidy_tests/test_tidy.py`
- [ ] These changes do not require tests
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13988)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 16 | ||||
-rw-r--r-- | components/script/dom/treewalker.rs | 2 | ||||
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 963f7f83165..5215359df8a 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -416,8 +416,8 @@ pub fn Navigate(iframe: &HTMLIFrameElement, direction: TraversalDirection) -> Er Ok(()) } else { - debug!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top - level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)"); + debug!(concat!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top", + "level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)")); Err(Error::NotSupported) } } @@ -499,8 +499,8 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { } Ok(()) } else { - debug!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top - level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)"); + debug!(concat!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top", + "level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)")); Err(Error::NotSupported) } } @@ -511,8 +511,8 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { self.set_visible(visible); Ok(()) } else { - debug!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top - level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)"); + debug!(concat!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top", + "level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)")); Err(Error::NotSupported) } } @@ -522,8 +522,8 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { if self.Mozbrowser() { Ok(self.visibility.get()) } else { - debug!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top - level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)"); + debug!(concat!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top", + "level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)")); Err(Error::NotSupported) } } diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs index 83d74cdbd81..1dc3d22f1cf 100644 --- a/components/script/dom/treewalker.rs +++ b/components/script/dom/treewalker.rs @@ -215,7 +215,7 @@ impl TreeWalkerMethods for TreeWalker { } match node.GetFirstChild() { None => break, - Some (child) => { + Some(child) => { // "1. Set node to its first child." node = child; // "2. Filter node and set result to the return value." diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index a9a2b0cb476..1f25a9e02d1 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -525,7 +525,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest { // Step 7 self.upload_complete.set(match extracted { None => true, - Some (ref e) if e.0.is_empty() => true, + Some(ref e) if e.0.is_empty() => true, _ => false }); // Step 8 |