Skip to content

Commit

Permalink
replace &string with &str
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse committed Sep 30, 2023
1 parent e6bc7f6 commit 20cba47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub fn send_message(
let game_info = is_running(game_name);
if game_info.is_running {
let mut message_id = current_message_id.load(atomic::Ordering::Relaxed);
let current_message: &String = &cfg.messages[message_id as usize];
let current_message: &str = &cfg.messages[message_id as usize];

unsafe {
SetForegroundWindow(game_info.game_process);
Expand Down
2 changes: 1 addition & 1 deletion src/send_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub unsafe fn key_enter(key_code: u16, timeout: u64) {
key_up(key_code);
}

pub unsafe fn send_key(key: &String, timeout: u64) {
pub unsafe fn send_key(key: &str, timeout: u64) {
let char = key.chars().next().unwrap();
if let Some(dx) = char_to_dxcodes(char) {
match dx {
Expand Down

0 comments on commit 20cba47

Please sign in to comment.