logging: Use in merged functions

This commit is contained in:
Dorota Czaplejewicz
2020-01-28 12:45:45 +00:00
parent de8aaa1a47
commit cd252634bd
2 changed files with 9 additions and 2 deletions

View File

@ -155,7 +155,10 @@ pub fn generate_keymap(
keycodes.next().expect("Erase key has no keycode"),
)?;
if let Some(_) = keycodes.next() {
eprintln!("BUG: Erase key has multiple keycodes");
log_print!(
logging::Level::Bug,
"Erase key has multiple keycodes",
);
}
},
_ => {},

View File

@ -21,6 +21,7 @@ use ::action::Action;
use ::imservice;
use ::imservice::IMService;
use ::keyboard::{ KeyCode, KeyState, KeyStateId, PressType };
use ::logging;
use ::vkeyboard::VirtualKeyboard;
/// Gathers stuff defined in C or called by C
@ -121,7 +122,10 @@ impl Submission {
| Action::Erase
=> (),
_ => {
eprintln!("BUG: Submitted key with action other than Submit or Erase");
log_print!(
logging::Level::Bug,
"Submitted key with action other than Submit or Erase",
);
return;
},
};