Fix: compile for Linux
This commit is contained in:
parent
d77c7351aa
commit
9e564576e6
2 changed files with 5 additions and 3 deletions
|
@ -2,13 +2,15 @@
|
|||
use enigo::{KeyboardControllable};
|
||||
|
||||
#[cfg(target_family = "unix")]
|
||||
pub fn type_text(text: &str) {
|
||||
pub fn type_text(text: &str) -> Result<(),()> {
|
||||
enigo::Enigo::default().key_sequence(text);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_family = "unix")]
|
||||
pub fn click_tab() {
|
||||
pub fn click_tab() -> Result<(),()> {
|
||||
enigo::Enigo::default().key_click(enigo::Key::Tab);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_family = "windows")]
|
||||
|
|
|
@ -81,7 +81,7 @@ fn main() {
|
|||
let password = "test";
|
||||
let broker_domain = "broker.emqx.io";
|
||||
|
||||
let mut c = comm::Comm::new(&broker_domain, &password, handle_time).unwrap();
|
||||
let c = comm::Comm::new(&broker_domain, &password, handle_time).unwrap();
|
||||
|
||||
//Gui::run(Settings::default());
|
||||
|
||||
|
|
Loading…
Reference in a new issue