webdriver: Move macros into their own module
authorJames Graham <james@hoppipolla.co.uk>
Thu, 15 Jan 2015 19:27:58 +0000
changeset 427997 8a4691497fa6e8e8f61bd7a87d12946379b41b6e
parent 427996 38afd700a0ebc04650aa4e178d7b111f596c0c2d
child 427998 850210710e1ee3ffde812e3ec0f13227605bdaaf
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
webdriver: Move macros into their own module Source-Repo: https://github.com/mozilla/webdriver-rust Source-Revision: 66e83050f3436bfa86f31a294ec5214e0200cffe
testing/webdriver/src/lib.rs
testing/webdriver/src/macros.rs
--- a/testing/webdriver/src/lib.rs
+++ b/testing/webdriver/src/lib.rs
@@ -3,25 +3,19 @@
 #![allow(non_snake_case)]
 
 #[macro_use] extern crate log;
 extern crate "rustc-serialize" as rustc_serialize;
 extern crate core;
 extern crate hyper;
 extern crate regex;
 
-macro_rules! try_opt {
-    ($expr:expr, $err_type:expr, $err_msg:expr) => ({
-        match $expr {
-            Some(x) => x,
-            None => return Err(WebDriverError::new($err_type, $err_msg))
-        }
-    })
-}
 
+#[macro_use]
+pub mod macros;
 pub mod command;
 pub mod common;
 pub mod httpserver;
 pub mod response;
 mod messagebuilder;
 
 
 #[test]
new file mode 100644
--- /dev/null
+++ b/testing/webdriver/src/macros.rs
@@ -0,0 +1,8 @@
+macro_rules! try_opt {
+    ($expr:expr, $err_type:expr, $err_msg:expr) => ({
+        match $expr {
+            Some(x) => x,
+            None => return Err(WebDriverError::new($err_type, $err_msg))
+        }
+    })
+}