diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-03-26 19:53:39 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-10 19:40:40 +0300 |
commit | 4629e6a22fb93d9f2e0b7db9a00b4789c7f28970 (patch) | |
tree | 1f86294caec50b81ec47da3057a05049290a4fd2 /ui/src/components/mail.rs | |
parent | d50c2017762a48b3c461324ce1a3f6f7a5770b7c (diff) |
meli: add debug_logs feature
Conditional print of debug logs in stderr. Previously they were always
printed
Diffstat (limited to 'ui/src/components/mail.rs')
-rw-r--r-- | ui/src/components/mail.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/src/components/mail.rs b/ui/src/components/mail.rs index 0fb9cd15..557de7cd 100644 --- a/ui/src/components/mail.rs +++ b/ui/src/components/mail.rs @@ -94,7 +94,9 @@ impl AccountMenu { context: &mut Context, ) -> usize { if !is_valid_area!(area) { - eprintln!("BUG: invalid area in print_account"); + if cfg!(feature = "debug_log") { + eprintln!("BUG: invalid area in print_account"); + } } let upper_left = upper_left!(area); let bottom_right = bottom_right!(area); @@ -290,6 +292,9 @@ impl Component for AccountMenu { self.dirty = true; } fn get_shortcuts(&self, _context: &Context) -> ShortcutMap { - [("Toggle account menu visibility", Key::Char('\t'))].iter().cloned().collect() + [("Toggle account menu visibility", Key::Char('\t'))] + .iter() + .cloned() + .collect() } } |