aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 01:32:40 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:49:08 +0200
commit577370746e2ce3da7fa25a20b8e1bbeed319df65 (patch)
tree8082a48e08b01ad5fbfc29b4bfaf4a47f42f2889 /python/tidy
parent9a7ba89c841cc9ea2e2500813aa844b4d9c35828 (diff)
downloadservo-577370746e2ce3da7fa25a20b8e1bbeed319df65.tar.gz
servo-577370746e2ce3da7fa25a20b8e1bbeed319df65.zip
Rename DOMRefCell<T> to DomRefCell<T>
I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
Diffstat (limited to 'python/tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py6
-rw-r--r--python/tidy/servo_tidy_tests/ban-domrefcell.rs6
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index d7c83ee8cee..e23834c0c58 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -574,11 +574,11 @@ def check_rust(file_name, lines):
# No benefit over using &str
(r": &String", "use &str instead of &String", no_filter),
# There should be any use of banned types:
- # Cell<JSVal>, Cell<Dom<T>>, DOMRefCell<Dom<T>>, DOMRefCell<HEAP<T>>
+ # Cell<JSVal>, Cell<Dom<T>>, DomRefCell<Dom<T>>, DomRefCell<HEAP<T>>
(r"(\s|:)+Cell<JSVal>", "Banned type Cell<JSVal> detected. Use MutDom<JSVal> instead", no_filter),
(r"(\s|:)+Cell<Dom<.+>>", "Banned type Cell<Dom<T>> detected. Use MutDom<T> instead", no_filter),
- (r"DOMRefCell<Dom<.+>>", "Banned type DOMRefCell<Dom<T>> detected. Use MutDom<T> instead", no_filter),
- (r"DOMRefCell<Heap<.+>>", "Banned type DOMRefCell<Heap<T>> detected. Use MutDom<T> instead", no_filter),
+ (r"DomRefCell<Dom<.+>>", "Banned type DomRefCell<Dom<T>> detected. Use MutDom<T> instead", no_filter),
+ (r"DomRefCell<Heap<.+>>", "Banned type DomRefCell<Heap<T>> detected. Use MutDom<T> instead", no_filter),
# No benefit to using &Root<T>
(r": &Root<", "use &T instead of &Root<T>", no_filter),
(r"^&&", "operators should go at the end of the first line", no_filter),
diff --git a/python/tidy/servo_tidy_tests/ban-domrefcell.rs b/python/tidy/servo_tidy_tests/ban-domrefcell.rs
index 6d4e2b2fbc3..74b79e813cf 100644
--- a/python/tidy/servo_tidy_tests/ban-domrefcell.rs
+++ b/python/tidy/servo_tidy_tests/ban-domrefcell.rs
@@ -8,12 +8,12 @@
extern crate script;
use script::test::Dom;
-use script::test::DOMRefCell;
+use script::test::DomRefCell;
use script::test::Node;
struct Foo {
- bar: DOMRefCell<Dom<Node>>
- //~^ ERROR Banned type DOMRefCell<Dom<T>> detected. Use MutDom<T> instead
+ bar: DomRefCell<Dom<Node>>
+ //~^ ERROR Banned type DomRefCell<Dom<T>> detected. Use MutDom<T> instead
}
fn main() {}
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 3761975c62b..3826e4537b5 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -151,7 +151,7 @@ class CheckTidiness(unittest.TestCase):
self.assertNoMoreErrors(ban_errors)
ban_errors = tidy.collect_errors_for_files(iterFile('ban-domrefcell.rs'), [], [tidy.check_rust], print_text=False)
- self.assertEqual('Banned type DOMRefCell<Dom<T>> detected. Use MutDom<T> instead', ban_errors.next()[2])
+ self.assertEqual('Banned type DomRefCell<Dom<T>> detected. Use MutDom<T> instead', ban_errors.next()[2])
self.assertNoMoreErrors(ban_errors)
def test_spec_link(self):