Skip to content

Commit

Permalink
fix something
Browse files Browse the repository at this point in the history
  • Loading branch information
sout233 committed Jun 6, 2024
1 parent b11253f commit aa5e6f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fs;

use super::helper;

// 高级吧,结构体(其实并没什么卵用)
#[derive(Serialize, Deserialize)]
struct KeyMap {
Expand All @@ -30,7 +32,7 @@ pub fn read_config() -> Option<HashMap<String, Option<u8>>> {
let binding = config_dir.join("key_mapping.json");
let path = binding.to_str().unwrap_or_default();

Reaper::get().show_console_msg(path);
helper::rpr_cprintln(path);

// 读取JSON文件
let json_content = fs::read_to_string(path).ok()?;
Expand Down
2 changes: 1 addition & 1 deletion src/helper.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rea_rs::Reaper;

#[cfg(debug_assertions)]
pub fn rpr_cprintln(msg: &str) {
let reaper = Reaper::get();
#[cfg(debug_assertions)]
reaper.show_console_msg(msg);
}

Expand Down

0 comments on commit aa5e6f6

Please sign in to comment.