Format code

This commit is contained in:
Federico Terzi 2021-02-10 21:33:14 +01:00
parent c2f497ef59
commit e3e1ad720f
3 changed files with 9 additions and 6 deletions

View File

@ -33,4 +33,4 @@ pub mod mac;
#[cfg(target_os = "macos")]
#[macro_use]
extern crate lazy_static;
extern crate lazy_static;

View File

@ -17,10 +17,13 @@
* along with espanso. If not, see <https://www.gnu.org/licenses/>.
*/
use std::{ffi::{CStr}, sync::{
use std::{
ffi::CStr,
sync::{
mpsc::{channel, Receiver, Sender},
Arc, Mutex,
}};
},
};
use lazycell::LazyCell;
use log::{error, trace, warn};
@ -169,7 +172,8 @@ impl From<RawInputEvent> for Option<InputEvent> {
let (key, variant) = key_code_to_key(raw.key_code);
let value = if raw.buffer_len > 0 {
let raw_string_result = CStr::from_bytes_with_nul(&raw.buffer[..((raw.buffer_len + 1) as usize)]);
let raw_string_result =
CStr::from_bytes_with_nul(&raw.buffer[..((raw.buffer_len + 1) as usize)]);
match raw_string_result {
Ok(c_string) => {
let string_result = c_string.to_str();
@ -340,4 +344,3 @@ mod tests {
);
}
}

View File

@ -1,5 +1,5 @@
use espanso_detect::event::{InputEvent, Status};
use espanso_inject::{Injector, get_injector};
use espanso_inject::{get_injector, Injector};
use espanso_ui::{event::UIEvent::*, icons::TrayIcon, menu::*};
use simplelog::{CombinedLogger, Config, LevelFilter, TermLogger, TerminalMode};