mirror of
https://github.com/servo/servo
synced 2026-05-03 04:42:17 +02:00
Add a tidy check for problematic match cases in script_thread.rs
This commit is contained in:
18
python/tidy/servo_tidy_tests/script_thread.rs
Normal file
18
python/tidy/servo_tidy_tests/script_thread.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
fn main() {
|
||||
// This should trigger an error.
|
||||
match self.documents.borrow_mut() {
|
||||
_ => {}
|
||||
}
|
||||
// This should trigger an error.
|
||||
match self.documents.borrow() {
|
||||
_ => {}
|
||||
}
|
||||
// This should not trigger an error.
|
||||
match { self.documents.borrow().find_window(id) } {
|
||||
=> {}
|
||||
}
|
||||
// This should not trigger an error.
|
||||
match self.documents_status.borrow() {
|
||||
=> {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user