diff options
author | Joe Wilm <joe@jwilm.com> | 2016-11-19 18:12:04 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-11-19 21:34:22 -0800 |
commit | 0dfba3018115bb3b7c0e93add421e2f8f1454126 (patch) | |
tree | 4f60c32a0c16280ea8efcdce03b19fb95e32ef91 /src/macros.rs | |
parent | 66dbd29cd194a4c84f796f32827429895c2a3bba (diff) | |
download | alacritty-0dfba3018115bb3b7c0e93add421e2f8f1454126.tar.gz alacritty-0dfba3018115bb3b7c0e93add421e2f8f1454126.zip |
Add a number of simple ref-tests
Also adds a feature `err-println` for enabling `err_println!` printing.
Diffstat (limited to 'src/macros.rs')
-rw-r--r-- | src/macros.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/macros.rs b/src/macros.rs index 97c317b2..eb37d4db 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -23,16 +23,10 @@ macro_rules! die { #[macro_export] macro_rules! err_println { ($($arg:tt)*) => {{ - use std::io::Write; - (writeln!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr"); - }} -} - -#[macro_export] -macro_rules! err_println { - ($($arg:tt)*) => {{ - use std::io::Write; - (writeln!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr"); + if cfg!(feature = "err-println") { + use std::io::Write; + (writeln!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr"); + } }} } |