aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.rs6
-rw-r--r--src/input.rs2
-rw-r--r--src/macros.rs22
-rw-r--r--src/main.rs2
4 files changed, 6 insertions, 26 deletions
diff --git a/src/config.rs b/src/config.rs
index 858d9a46..23af5362 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -370,7 +370,7 @@ impl<'a> de::Deserialize<'a> for ModsWrapper {
"Shift" => res.shift = true,
"Alt" | "Option" => res.alt = true,
"Control" => res.ctrl = true,
- _ => err_println!("unknown modifier {:?}", modifier),
+ _ => eprintln!("unknown modifier {:?}", modifier),
}
}
@@ -467,7 +467,7 @@ impl<'a> de::Deserialize<'a> for ModeWrapper {
"~AppCursor" => res.not_mode |= mode::APP_CURSOR,
"AppKeypad" => res.mode |= mode::APP_KEYPAD,
"~AppKeypad" => res.not_mode |= mode::APP_KEYPAD,
- _ => err_println!("unknown omde {:?}", modifier),
+ _ => eprintln!("unknown omde {:?}", modifier),
}
}
@@ -1476,7 +1476,7 @@ impl Monitor {
let _ = config_tx.send(config);
handler.on_config_reload();
},
- Err(err) => err_println!("Ignoring invalid config: {}", err),
+ Err(err) => eprintln!("Ignoring invalid config: {}", err),
}
}
}
diff --git a/src/input.rs b/src/input.rs
index 7378e8dc..4901a409 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -187,7 +187,7 @@ impl Action {
.and_then(|clipboard| clipboard.load_primary() )
.map(|contents| { self.paste(ctx, contents) })
.unwrap_or_else(|err| {
- err_println!("Error loading data from clipboard. {}", Red(err));
+ eprintln!("Error loading data from clipboard. {}", Red(err));
});
},
Action::PasteSelection => {
diff --git a/src/macros.rs b/src/macros.rs
index 00a9b529..35e69f2d 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -15,32 +15,12 @@
#[macro_export]
macro_rules! die {
($($arg:tt)*) => {{
- err_println!($($arg)*);
+ eprintln!($($arg)*);
::std::process::exit(1);
}}
}
#[macro_export]
-macro_rules! err_println {
- ($($arg:tt)*) => {{
- if cfg!(feature = "err-println") {
- use std::io::Write;
- (writeln!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr");
- }
- }}
-}
-
-#[macro_export]
-macro_rules! err_print {
- ($($arg:tt)*) => {{
- if cfg!(feature = "err-println") {
- use std::io::Write;
- (write!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr");
- }
- }}
-}
-
-#[macro_export]
macro_rules! maybe {
($option:expr) => {
match $option {
diff --git a/src/main.rs b/src/main.rs
index ca7a40c6..a9eb9ab0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,7 +68,7 @@ fn load_config(options: &cli::Options) -> Config {
die!("Config file not found at: {}", config_path.display());
},
config::Error::Empty => {
- err_println!("Empty config; Loading defaults");
+ eprintln!("Empty config; Loading defaults");
Config::default()
},
_ => die!("{}", err),