Format code
This commit is contained in:
parent
c2f497ef59
commit
e3e1ad720f
|
@ -33,4 +33,4 @@ pub mod mac;
|
|||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate lazy_static;
|
||||
|
|
|
@ -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 {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user